// source: spine/time/time.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);
goog.exportSymbol('proto.spine.time.DayOfWeek', null, global);
goog.exportSymbol('proto.spine.time.LocalDate', null, global);
goog.exportSymbol('proto.spine.time.LocalDateTime', null, global);
goog.exportSymbol('proto.spine.time.LocalTime', null, global);
goog.exportSymbol('proto.spine.time.Month', null, global);
goog.exportSymbol('proto.spine.time.OffsetDateTime', null, global);
goog.exportSymbol('proto.spine.time.OffsetTime', null, global);
goog.exportSymbol('proto.spine.time.YearMonth', null, global);
goog.exportSymbol('proto.spine.time.ZoneId', null, global);
goog.exportSymbol('proto.spine.time.ZoneOffset', null, global);
goog.exportSymbol('proto.spine.time.ZonedDateTime', 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.time.YearMonth = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.time.YearMonth, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.time.YearMonth.displayName = 'proto.spine.time.YearMonth';
}
/**
* 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.time.LocalDate = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.time.LocalDate, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.time.LocalDate.displayName = 'proto.spine.time.LocalDate';
}
/**
* 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.time.LocalTime = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.time.LocalTime, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.time.LocalTime.displayName = 'proto.spine.time.LocalTime';
}
/**
* 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.time.LocalDateTime = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.time.LocalDateTime, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.time.LocalDateTime.displayName = 'proto.spine.time.LocalDateTime';
}
/**
* 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.time.ZoneOffset = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.time.ZoneOffset, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.time.ZoneOffset.displayName = 'proto.spine.time.ZoneOffset';
}
/**
* 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.time.OffsetTime = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.time.OffsetTime, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.time.OffsetTime.displayName = 'proto.spine.time.OffsetTime';
}
/**
* 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.time.OffsetDateTime = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.time.OffsetDateTime, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.time.OffsetDateTime.displayName = 'proto.spine.time.OffsetDateTime';
}
/**
* 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.time.ZoneId = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.time.ZoneId, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.time.ZoneId.displayName = 'proto.spine.time.ZoneId';
}
/**
* 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.time.ZonedDateTime = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.time.ZonedDateTime, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.time.ZonedDateTime.displayName = 'proto.spine.time.ZonedDateTime';
}
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.time.YearMonth.prototype.toObject = function(opt_includeInstance) {
return proto.spine.time.YearMonth.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.time.YearMonth} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.YearMonth.toObject = function(includeInstance, msg) {
var f, obj = {
year: jspb.Message.getFieldWithDefault(msg, 1, 0),
month: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.spine.time.YearMonth}
*/
proto.spine.time.YearMonth.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.time.YearMonth;
return proto.spine.time.YearMonth.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.time.YearMonth} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.time.YearMonth}
*/
proto.spine.time.YearMonth.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setYear(value);
break;
case 2:
var value = /** @type {!proto.spine.time.Month} */ (reader.readEnum());
msg.setMonth(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.time.YearMonth.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.time.YearMonth.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.time.YearMonth} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.YearMonth.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getYear();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
f = message.getMonth();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
};
/**
* optional int32 year = 1;
* @return {number}
*/
proto.spine.time.YearMonth.prototype.getYear = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.spine.time.YearMonth} returns this
*/
proto.spine.time.YearMonth.prototype.setYear = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional Month month = 2;
* @return {!proto.spine.time.Month}
*/
proto.spine.time.YearMonth.prototype.getMonth = function() {
return /** @type {!proto.spine.time.Month} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.spine.time.Month} value
* @return {!proto.spine.time.YearMonth} returns this
*/
proto.spine.time.YearMonth.prototype.setMonth = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.spine.time.LocalDate.prototype.toObject = function(opt_includeInstance) {
return proto.spine.time.LocalDate.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.time.LocalDate} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.LocalDate.toObject = function(includeInstance, msg) {
var f, obj = {
year: jspb.Message.getFieldWithDefault(msg, 1, 0),
month: jspb.Message.getFieldWithDefault(msg, 2, 0),
day: 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.time.LocalDate}
*/
proto.spine.time.LocalDate.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.time.LocalDate;
return proto.spine.time.LocalDate.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.time.LocalDate} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.time.LocalDate}
*/
proto.spine.time.LocalDate.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setYear(value);
break;
case 2:
var value = /** @type {!proto.spine.time.Month} */ (reader.readEnum());
msg.setMonth(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt32());
msg.setDay(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.time.LocalDate.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.time.LocalDate.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.time.LocalDate} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.LocalDate.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getYear();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
f = message.getMonth();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getDay();
if (f !== 0) {
writer.writeInt32(
3,
f
);
}
};
/**
* optional int32 year = 1;
* @return {number}
*/
proto.spine.time.LocalDate.prototype.getYear = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.spine.time.LocalDate} returns this
*/
proto.spine.time.LocalDate.prototype.setYear = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional Month month = 2;
* @return {!proto.spine.time.Month}
*/
proto.spine.time.LocalDate.prototype.getMonth = function() {
return /** @type {!proto.spine.time.Month} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.spine.time.Month} value
* @return {!proto.spine.time.LocalDate} returns this
*/
proto.spine.time.LocalDate.prototype.setMonth = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional int32 day = 3;
* @return {number}
*/
proto.spine.time.LocalDate.prototype.getDay = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.spine.time.LocalDate} returns this
*/
proto.spine.time.LocalDate.prototype.setDay = function(value) {
return jspb.Message.setProto3IntField(this, 3, 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.time.LocalTime.prototype.toObject = function(opt_includeInstance) {
return proto.spine.time.LocalTime.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.time.LocalTime} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.LocalTime.toObject = function(includeInstance, msg) {
var f, obj = {
hour: jspb.Message.getFieldWithDefault(msg, 1, 0),
minute: jspb.Message.getFieldWithDefault(msg, 2, 0),
second: jspb.Message.getFieldWithDefault(msg, 3, 0),
nano: jspb.Message.getFieldWithDefault(msg, 4, 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.time.LocalTime}
*/
proto.spine.time.LocalTime.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.time.LocalTime;
return proto.spine.time.LocalTime.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.time.LocalTime} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.time.LocalTime}
*/
proto.spine.time.LocalTime.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setHour(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setMinute(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt32());
msg.setSecond(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setNano(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.time.LocalTime.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.time.LocalTime.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.time.LocalTime} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.LocalTime.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHour();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
f = message.getMinute();
if (f !== 0) {
writer.writeInt32(
2,
f
);
}
f = message.getSecond();
if (f !== 0) {
writer.writeInt32(
3,
f
);
}
f = message.getNano();
if (f !== 0) {
writer.writeInt32(
4,
f
);
}
};
/**
* optional int32 hour = 1;
* @return {number}
*/
proto.spine.time.LocalTime.prototype.getHour = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.spine.time.LocalTime} returns this
*/
proto.spine.time.LocalTime.prototype.setHour = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional int32 minute = 2;
* @return {number}
*/
proto.spine.time.LocalTime.prototype.getMinute = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.spine.time.LocalTime} returns this
*/
proto.spine.time.LocalTime.prototype.setMinute = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional int32 second = 3;
* @return {number}
*/
proto.spine.time.LocalTime.prototype.getSecond = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.spine.time.LocalTime} returns this
*/
proto.spine.time.LocalTime.prototype.setSecond = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int32 nano = 4;
* @return {number}
*/
proto.spine.time.LocalTime.prototype.getNano = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.spine.time.LocalTime} returns this
*/
proto.spine.time.LocalTime.prototype.setNano = function(value) {
return jspb.Message.setProto3IntField(this, 4, 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.time.LocalDateTime.prototype.toObject = function(opt_includeInstance) {
return proto.spine.time.LocalDateTime.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.time.LocalDateTime} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.LocalDateTime.toObject = function(includeInstance, msg) {
var f, obj = {
date: (f = msg.getDate()) && proto.spine.time.LocalDate.toObject(includeInstance, f),
time: (f = msg.getTime()) && proto.spine.time.LocalTime.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.time.LocalDateTime}
*/
proto.spine.time.LocalDateTime.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.time.LocalDateTime;
return proto.spine.time.LocalDateTime.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.time.LocalDateTime} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.time.LocalDateTime}
*/
proto.spine.time.LocalDateTime.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.spine.time.LocalDate;
reader.readMessage(value,proto.spine.time.LocalDate.deserializeBinaryFromReader);
msg.setDate(value);
break;
case 2:
var value = new proto.spine.time.LocalTime;
reader.readMessage(value,proto.spine.time.LocalTime.deserializeBinaryFromReader);
msg.setTime(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.time.LocalDateTime.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.time.LocalDateTime.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.time.LocalDateTime} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.LocalDateTime.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDate();
if (f != null) {
writer.writeMessage(
1,
f,
proto.spine.time.LocalDate.serializeBinaryToWriter
);
}
f = message.getTime();
if (f != null) {
writer.writeMessage(
2,
f,
proto.spine.time.LocalTime.serializeBinaryToWriter
);
}
};
/**
* optional LocalDate date = 1;
* @return {?proto.spine.time.LocalDate}
*/
proto.spine.time.LocalDateTime.prototype.getDate = function() {
return /** @type{?proto.spine.time.LocalDate} */ (
jspb.Message.getWrapperField(this, proto.spine.time.LocalDate, 1));
};
/**
* @param {?proto.spine.time.LocalDate|undefined} value
* @return {!proto.spine.time.LocalDateTime} returns this
*/
proto.spine.time.LocalDateTime.prototype.setDate = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.time.LocalDateTime} returns this
*/
proto.spine.time.LocalDateTime.prototype.clearDate = function() {
return this.setDate(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.time.LocalDateTime.prototype.hasDate = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional LocalTime time = 2;
* @return {?proto.spine.time.LocalTime}
*/
proto.spine.time.LocalDateTime.prototype.getTime = function() {
return /** @type{?proto.spine.time.LocalTime} */ (
jspb.Message.getWrapperField(this, proto.spine.time.LocalTime, 2));
};
/**
* @param {?proto.spine.time.LocalTime|undefined} value
* @return {!proto.spine.time.LocalDateTime} returns this
*/
proto.spine.time.LocalDateTime.prototype.setTime = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.time.LocalDateTime} returns this
*/
proto.spine.time.LocalDateTime.prototype.clearTime = function() {
return this.setTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.time.LocalDateTime.prototype.hasTime = function() {
return jspb.Message.getField(this, 2) != 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.time.ZoneOffset.prototype.toObject = function(opt_includeInstance) {
return proto.spine.time.ZoneOffset.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.time.ZoneOffset} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.ZoneOffset.toObject = function(includeInstance, msg) {
var f, obj = {
amountSeconds: jspb.Message.getFieldWithDefault(msg, 1, 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.time.ZoneOffset}
*/
proto.spine.time.ZoneOffset.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.time.ZoneOffset;
return proto.spine.time.ZoneOffset.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.time.ZoneOffset} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.time.ZoneOffset}
*/
proto.spine.time.ZoneOffset.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setAmountSeconds(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.time.ZoneOffset.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.time.ZoneOffset.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.time.ZoneOffset} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.ZoneOffset.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAmountSeconds();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
};
/**
* optional int32 amount_seconds = 1;
* @return {number}
*/
proto.spine.time.ZoneOffset.prototype.getAmountSeconds = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.spine.time.ZoneOffset} returns this
*/
proto.spine.time.ZoneOffset.prototype.setAmountSeconds = function(value) {
return jspb.Message.setProto3IntField(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.time.OffsetTime.prototype.toObject = function(opt_includeInstance) {
return proto.spine.time.OffsetTime.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.time.OffsetTime} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.OffsetTime.toObject = function(includeInstance, msg) {
var f, obj = {
time: (f = msg.getTime()) && proto.spine.time.LocalTime.toObject(includeInstance, f),
offset: (f = msg.getOffset()) && proto.spine.time.ZoneOffset.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.time.OffsetTime}
*/
proto.spine.time.OffsetTime.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.time.OffsetTime;
return proto.spine.time.OffsetTime.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.time.OffsetTime} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.time.OffsetTime}
*/
proto.spine.time.OffsetTime.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.spine.time.LocalTime;
reader.readMessage(value,proto.spine.time.LocalTime.deserializeBinaryFromReader);
msg.setTime(value);
break;
case 2:
var value = new proto.spine.time.ZoneOffset;
reader.readMessage(value,proto.spine.time.ZoneOffset.deserializeBinaryFromReader);
msg.setOffset(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.time.OffsetTime.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.time.OffsetTime.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.time.OffsetTime} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.OffsetTime.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTime();
if (f != null) {
writer.writeMessage(
1,
f,
proto.spine.time.LocalTime.serializeBinaryToWriter
);
}
f = message.getOffset();
if (f != null) {
writer.writeMessage(
2,
f,
proto.spine.time.ZoneOffset.serializeBinaryToWriter
);
}
};
/**
* optional LocalTime time = 1;
* @return {?proto.spine.time.LocalTime}
*/
proto.spine.time.OffsetTime.prototype.getTime = function() {
return /** @type{?proto.spine.time.LocalTime} */ (
jspb.Message.getWrapperField(this, proto.spine.time.LocalTime, 1));
};
/**
* @param {?proto.spine.time.LocalTime|undefined} value
* @return {!proto.spine.time.OffsetTime} returns this
*/
proto.spine.time.OffsetTime.prototype.setTime = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.time.OffsetTime} returns this
*/
proto.spine.time.OffsetTime.prototype.clearTime = function() {
return this.setTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.time.OffsetTime.prototype.hasTime = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional ZoneOffset offset = 2;
* @return {?proto.spine.time.ZoneOffset}
*/
proto.spine.time.OffsetTime.prototype.getOffset = function() {
return /** @type{?proto.spine.time.ZoneOffset} */ (
jspb.Message.getWrapperField(this, proto.spine.time.ZoneOffset, 2));
};
/**
* @param {?proto.spine.time.ZoneOffset|undefined} value
* @return {!proto.spine.time.OffsetTime} returns this
*/
proto.spine.time.OffsetTime.prototype.setOffset = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.time.OffsetTime} returns this
*/
proto.spine.time.OffsetTime.prototype.clearOffset = function() {
return this.setOffset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.time.OffsetTime.prototype.hasOffset = function() {
return jspb.Message.getField(this, 2) != 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.time.OffsetDateTime.prototype.toObject = function(opt_includeInstance) {
return proto.spine.time.OffsetDateTime.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.time.OffsetDateTime} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.OffsetDateTime.toObject = function(includeInstance, msg) {
var f, obj = {
dateTime: (f = msg.getDateTime()) && proto.spine.time.LocalDateTime.toObject(includeInstance, f),
offset: (f = msg.getOffset()) && proto.spine.time.ZoneOffset.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.time.OffsetDateTime}
*/
proto.spine.time.OffsetDateTime.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.time.OffsetDateTime;
return proto.spine.time.OffsetDateTime.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.time.OffsetDateTime} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.time.OffsetDateTime}
*/
proto.spine.time.OffsetDateTime.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.spine.time.LocalDateTime;
reader.readMessage(value,proto.spine.time.LocalDateTime.deserializeBinaryFromReader);
msg.setDateTime(value);
break;
case 2:
var value = new proto.spine.time.ZoneOffset;
reader.readMessage(value,proto.spine.time.ZoneOffset.deserializeBinaryFromReader);
msg.setOffset(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.time.OffsetDateTime.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.time.OffsetDateTime.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.time.OffsetDateTime} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.OffsetDateTime.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDateTime();
if (f != null) {
writer.writeMessage(
1,
f,
proto.spine.time.LocalDateTime.serializeBinaryToWriter
);
}
f = message.getOffset();
if (f != null) {
writer.writeMessage(
2,
f,
proto.spine.time.ZoneOffset.serializeBinaryToWriter
);
}
};
/**
* optional LocalDateTime date_time = 1;
* @return {?proto.spine.time.LocalDateTime}
*/
proto.spine.time.OffsetDateTime.prototype.getDateTime = function() {
return /** @type{?proto.spine.time.LocalDateTime} */ (
jspb.Message.getWrapperField(this, proto.spine.time.LocalDateTime, 1));
};
/**
* @param {?proto.spine.time.LocalDateTime|undefined} value
* @return {!proto.spine.time.OffsetDateTime} returns this
*/
proto.spine.time.OffsetDateTime.prototype.setDateTime = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.time.OffsetDateTime} returns this
*/
proto.spine.time.OffsetDateTime.prototype.clearDateTime = function() {
return this.setDateTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.time.OffsetDateTime.prototype.hasDateTime = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional ZoneOffset offset = 2;
* @return {?proto.spine.time.ZoneOffset}
*/
proto.spine.time.OffsetDateTime.prototype.getOffset = function() {
return /** @type{?proto.spine.time.ZoneOffset} */ (
jspb.Message.getWrapperField(this, proto.spine.time.ZoneOffset, 2));
};
/**
* @param {?proto.spine.time.ZoneOffset|undefined} value
* @return {!proto.spine.time.OffsetDateTime} returns this
*/
proto.spine.time.OffsetDateTime.prototype.setOffset = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.time.OffsetDateTime} returns this
*/
proto.spine.time.OffsetDateTime.prototype.clearOffset = function() {
return this.setOffset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.time.OffsetDateTime.prototype.hasOffset = function() {
return jspb.Message.getField(this, 2) != 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.time.ZoneId.prototype.toObject = function(opt_includeInstance) {
return proto.spine.time.ZoneId.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.time.ZoneId} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.ZoneId.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.time.ZoneId}
*/
proto.spine.time.ZoneId.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.time.ZoneId;
return proto.spine.time.ZoneId.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.time.ZoneId} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.time.ZoneId}
*/
proto.spine.time.ZoneId.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.time.ZoneId.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.time.ZoneId.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.time.ZoneId} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.ZoneId.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.time.ZoneId.prototype.getValue = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.spine.time.ZoneId} returns this
*/
proto.spine.time.ZoneId.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.time.ZonedDateTime.prototype.toObject = function(opt_includeInstance) {
return proto.spine.time.ZonedDateTime.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.time.ZonedDateTime} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.ZonedDateTime.toObject = function(includeInstance, msg) {
var f, obj = {
dateTime: (f = msg.getDateTime()) && proto.spine.time.LocalDateTime.toObject(includeInstance, f),
zone: (f = msg.getZone()) && proto.spine.time.ZoneId.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.time.ZonedDateTime}
*/
proto.spine.time.ZonedDateTime.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.time.ZonedDateTime;
return proto.spine.time.ZonedDateTime.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.time.ZonedDateTime} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.time.ZonedDateTime}
*/
proto.spine.time.ZonedDateTime.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.spine.time.LocalDateTime;
reader.readMessage(value,proto.spine.time.LocalDateTime.deserializeBinaryFromReader);
msg.setDateTime(value);
break;
case 2:
var value = new proto.spine.time.ZoneId;
reader.readMessage(value,proto.spine.time.ZoneId.deserializeBinaryFromReader);
msg.setZone(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.time.ZonedDateTime.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.time.ZonedDateTime.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.time.ZonedDateTime} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.time.ZonedDateTime.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDateTime();
if (f != null) {
writer.writeMessage(
1,
f,
proto.spine.time.LocalDateTime.serializeBinaryToWriter
);
}
f = message.getZone();
if (f != null) {
writer.writeMessage(
2,
f,
proto.spine.time.ZoneId.serializeBinaryToWriter
);
}
};
/**
* optional LocalDateTime date_time = 1;
* @return {?proto.spine.time.LocalDateTime}
*/
proto.spine.time.ZonedDateTime.prototype.getDateTime = function() {
return /** @type{?proto.spine.time.LocalDateTime} */ (
jspb.Message.getWrapperField(this, proto.spine.time.LocalDateTime, 1));
};
/**
* @param {?proto.spine.time.LocalDateTime|undefined} value
* @return {!proto.spine.time.ZonedDateTime} returns this
*/
proto.spine.time.ZonedDateTime.prototype.setDateTime = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.time.ZonedDateTime} returns this
*/
proto.spine.time.ZonedDateTime.prototype.clearDateTime = function() {
return this.setDateTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.time.ZonedDateTime.prototype.hasDateTime = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional ZoneId zone = 2;
* @return {?proto.spine.time.ZoneId}
*/
proto.spine.time.ZonedDateTime.prototype.getZone = function() {
return /** @type{?proto.spine.time.ZoneId} */ (
jspb.Message.getWrapperField(this, proto.spine.time.ZoneId, 2));
};
/**
* @param {?proto.spine.time.ZoneId|undefined} value
* @return {!proto.spine.time.ZonedDateTime} returns this
*/
proto.spine.time.ZonedDateTime.prototype.setZone = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.time.ZonedDateTime} returns this
*/
proto.spine.time.ZonedDateTime.prototype.clearZone = function() {
return this.setZone(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.time.ZonedDateTime.prototype.hasZone = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* @enum {number}
*/
proto.spine.time.Month = {
MONTH_UNDEFINED: 0,
JANUARY: 1,
FEBRUARY: 2,
MARCH: 3,
APRIL: 4,
MAY: 5,
JUNE: 6,
JULY: 7,
AUGUST: 8,
SEPTEMBER: 9,
OCTOBER: 10,
NOVEMBER: 11,
DECEMBER: 12
};
/**
* @enum {number}
*/
proto.spine.time.DayOfWeek = {
DOW_UNDEFINED: 0,
MONDAY: 1,
TUESDAY: 2,
WEDNESDAY: 3,
THURSDAY: 4,
FRIDAY: 5,
SATURDAY: 6,
SUNDAY: 7
};
goog.object.extend(exports, proto.spine.time);
// 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.time.YearMonth.Parser = function() {
ObjectParser.call(this);
};
proto.spine.time.YearMonth.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.time.YearMonth.Parser.prototype.constructor = proto.spine.time.YearMonth.Parser;
proto.spine.time.YearMonth.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.time.YearMonth();
if (obj.year !== undefined) {
if (obj.year !== null) {
let value = obj.year;
msg.setYear(value);
}
}
if (obj.month !== undefined) {
if (obj.month !== null) {
let value = proto.spine.time.Month[obj.month];
msg.setMonth(value);
}
}
return msg;
};
proto.spine.time.LocalTime.Parser = function() {
ObjectParser.call(this);
};
proto.spine.time.LocalTime.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.time.LocalTime.Parser.prototype.constructor = proto.spine.time.LocalTime.Parser;
proto.spine.time.LocalTime.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.time.LocalTime();
if (obj.hour !== undefined) {
if (obj.hour !== null) {
let value = obj.hour;
msg.setHour(value);
}
}
if (obj.minute !== undefined) {
if (obj.minute !== null) {
let value = obj.minute;
msg.setMinute(value);
}
}
if (obj.second !== undefined) {
if (obj.second !== null) {
let value = obj.second;
msg.setSecond(value);
}
}
if (obj.nano !== undefined) {
if (obj.nano !== null) {
let value = obj.nano;
msg.setNano(value);
}
}
return msg;
};
proto.spine.time.OffsetTime.Parser = function() {
ObjectParser.call(this);
};
proto.spine.time.OffsetTime.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.time.OffsetTime.Parser.prototype.constructor = proto.spine.time.OffsetTime.Parser;
proto.spine.time.OffsetTime.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.time.OffsetTime();
if (obj.time !== undefined) {
if (obj.time === null) {
msg.setTime(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalTime').fromObject(obj.time);
msg.setTime(value);
}
}
if (obj.offset !== undefined) {
if (obj.offset === null) {
msg.setOffset(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.time.ZoneOffset').fromObject(obj.offset);
msg.setOffset(value);
}
}
return msg;
};
proto.spine.time.ZoneOffset.Parser = function() {
ObjectParser.call(this);
};
proto.spine.time.ZoneOffset.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.time.ZoneOffset.Parser.prototype.constructor = proto.spine.time.ZoneOffset.Parser;
proto.spine.time.ZoneOffset.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.time.ZoneOffset();
if (obj.amountSeconds !== undefined) {
if (obj.amountSeconds !== null) {
let value = obj.amountSeconds;
msg.setAmountSeconds(value);
}
}
return msg;
};
proto.spine.time.ZoneId.Parser = function() {
ObjectParser.call(this);
};
proto.spine.time.ZoneId.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.time.ZoneId.Parser.prototype.constructor = proto.spine.time.ZoneId.Parser;
proto.spine.time.ZoneId.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.time.ZoneId();
if (obj.value !== undefined) {
if (obj.value !== null) {
let value = obj.value;
msg.setValue(value);
}
}
return msg;
};
proto.spine.time.LocalDateTime.Parser = function() {
ObjectParser.call(this);
};
proto.spine.time.LocalDateTime.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.time.LocalDateTime.Parser.prototype.constructor = proto.spine.time.LocalDateTime.Parser;
proto.spine.time.LocalDateTime.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.time.LocalDateTime();
if (obj.date !== undefined) {
if (obj.date === null) {
msg.setDate(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalDate').fromObject(obj.date);
msg.setDate(value);
}
}
if (obj.time !== undefined) {
if (obj.time === null) {
msg.setTime(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalTime').fromObject(obj.time);
msg.setTime(value);
}
}
return msg;
};
proto.spine.time.OffsetDateTime.Parser = function() {
ObjectParser.call(this);
};
proto.spine.time.OffsetDateTime.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.time.OffsetDateTime.Parser.prototype.constructor = proto.spine.time.OffsetDateTime.Parser;
proto.spine.time.OffsetDateTime.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.time.OffsetDateTime();
if (obj.dateTime !== undefined) {
if (obj.dateTime === null) {
msg.setDateTime(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalDateTime').fromObject(obj.dateTime);
msg.setDateTime(value);
}
}
if (obj.offset !== undefined) {
if (obj.offset === null) {
msg.setOffset(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.time.ZoneOffset').fromObject(obj.offset);
msg.setOffset(value);
}
}
return msg;
};
proto.spine.time.LocalDate.Parser = function() {
ObjectParser.call(this);
};
proto.spine.time.LocalDate.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.time.LocalDate.Parser.prototype.constructor = proto.spine.time.LocalDate.Parser;
proto.spine.time.LocalDate.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.time.LocalDate();
if (obj.year !== undefined) {
if (obj.year !== null) {
let value = obj.year;
msg.setYear(value);
}
}
if (obj.month !== undefined) {
if (obj.month !== null) {
let value = proto.spine.time.Month[obj.month];
msg.setMonth(value);
}
}
if (obj.day !== undefined) {
if (obj.day !== null) {
let value = obj.day;
msg.setDay(value);
}
}
return msg;
};
proto.spine.time.ZonedDateTime.Parser = function() {
ObjectParser.call(this);
};
proto.spine.time.ZonedDateTime.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.time.ZonedDateTime.Parser.prototype.constructor = proto.spine.time.ZonedDateTime.Parser;
proto.spine.time.ZonedDateTime.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.time.ZonedDateTime();
if (obj.dateTime !== undefined) {
if (obj.dateTime === null) {
msg.setDateTime(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalDateTime').fromObject(obj.dateTime);
msg.setDateTime(value);
}
}
if (obj.zone !== undefined) {
if (obj.zone === null) {
msg.setZone(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.time.ZoneId').fromObject(obj.zone);
msg.setZone(value);
}
}
return msg;
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.YearMonth.typeUrl = function() {
return 'type.spine.io/spine.time.YearMonth';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.LocalTime.typeUrl = function() {
return 'type.spine.io/spine.time.LocalTime';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.OffsetTime.typeUrl = function() {
return 'type.spine.io/spine.time.OffsetTime';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.ZoneOffset.typeUrl = function() {
return 'type.spine.io/spine.time.ZoneOffset';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.ZoneId.typeUrl = function() {
return 'type.spine.io/spine.time.ZoneId';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.LocalDateTime.typeUrl = function() {
return 'type.spine.io/spine.time.LocalDateTime';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.OffsetDateTime.typeUrl = function() {
return 'type.spine.io/spine.time.OffsetDateTime';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.LocalDate.typeUrl = function() {
return 'type.spine.io/spine.time.LocalDate';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.ZonedDateTime.typeUrl = function() {
return 'type.spine.io/spine.time.ZonedDateTime';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.DayOfWeek.typeUrl = function() {
return 'type.spine.io/spine.time.DayOfWeek';
};
// Generated by Spine ProtoJs Plugin
proto.spine.time.Month.typeUrl = function() {
return 'type.spine.io/spine.time.Month';
};