UNPKG

echofi-client

Version:

A comprehensive TypeScript/JavaScript client library for EchoFi services with automatic gRPC-Web code generation, unified service access, and real-time WebSocket communication.

1,333 lines (1,150 loc) 40.8 kB
// source: activity/processing_cycles.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { if (this) { return this; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } if (typeof self !== 'undefined') { return self; } return Function('return this')(); }.call(null)); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.activity.CreateProcessingCycleRequest', null, global); goog.exportSymbol('proto.activity.GetProcessingCycleByTypeRequest', null, global); goog.exportSymbol('proto.activity.ProcessingCycleResponse', null, global); goog.exportSymbol('proto.activity.ProcessingCycles', null, global); goog.exportSymbol('proto.activity.UpdateProcessingCycleRequest', 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.activity.ProcessingCycles = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.activity.ProcessingCycles, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.ProcessingCycles.displayName = 'proto.activity.ProcessingCycles'; } /** * 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.activity.CreateProcessingCycleRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.activity.CreateProcessingCycleRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.CreateProcessingCycleRequest.displayName = 'proto.activity.CreateProcessingCycleRequest'; } /** * 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.activity.UpdateProcessingCycleRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.activity.UpdateProcessingCycleRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.UpdateProcessingCycleRequest.displayName = 'proto.activity.UpdateProcessingCycleRequest'; } /** * 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.activity.GetProcessingCycleByTypeRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.activity.GetProcessingCycleByTypeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.GetProcessingCycleByTypeRequest.displayName = 'proto.activity.GetProcessingCycleByTypeRequest'; } /** * 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.activity.ProcessingCycleResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.activity.ProcessingCycleResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.ProcessingCycleResponse.displayName = 'proto.activity.ProcessingCycleResponse'; } 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.activity.ProcessingCycles.prototype.toObject = function(opt_includeInstance) { return proto.activity.ProcessingCycles.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.activity.ProcessingCycles} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.ProcessingCycles.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, 0), cycleType: jspb.Message.getFieldWithDefault(msg, 2, ""), lastCompletedAt: (f = msg.getLastCompletedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), processedCount: jspb.Message.getFieldWithDefault(msg, 4, 0), cycleDurationMs: jspb.Message.getFieldWithDefault(msg, 5, 0), createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), updatedAt: (f = msg.getUpdatedAt()) && 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.activity.ProcessingCycles} */ proto.activity.ProcessingCycles.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.ProcessingCycles; return proto.activity.ProcessingCycles.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.ProcessingCycles} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.ProcessingCycles} */ proto.activity.ProcessingCycles.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.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setCycleType(value); break; case 3: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setLastCompletedAt(value); break; case 4: var value = /** @type {number} */ (reader.readInt32()); msg.setProcessedCount(value); break; case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setCycleDurationMs(value); break; case 6: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setCreatedAt(value); break; case 7: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setUpdatedAt(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.activity.ProcessingCycles.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.ProcessingCycles.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.activity.ProcessingCycles} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.ProcessingCycles.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getCycleType(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getLastCompletedAt(); if (f != null) { writer.writeMessage( 3, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getProcessedCount(); if (f !== 0) { writer.writeInt32( 4, f ); } f = message.getCycleDurationMs(); if (f !== 0) { writer.writeInt64( 5, f ); } f = message.getCreatedAt(); if (f != null) { writer.writeMessage( 6, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getUpdatedAt(); if (f != null) { writer.writeMessage( 7, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** * optional int32 id = 1; * @return {number} */ proto.activity.ProcessingCycles.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string cycle_type = 2; * @return {string} */ proto.activity.ProcessingCycles.prototype.getCycleType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.setCycleType = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional google.protobuf.Timestamp last_completed_at = 3; * @return {?proto.google.protobuf.Timestamp} */ proto.activity.ProcessingCycles.prototype.getLastCompletedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.setLastCompletedAt = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.clearLastCompletedAt = function() { return this.setLastCompletedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.ProcessingCycles.prototype.hasLastCompletedAt = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional int32 processed_count = 4; * @return {number} */ proto.activity.ProcessingCycles.prototype.getProcessedCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.setProcessedCount = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * optional int64 cycle_duration_ms = 5; * @return {number} */ proto.activity.ProcessingCycles.prototype.getCycleDurationMs = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.setCycleDurationMs = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; /** * optional google.protobuf.Timestamp created_at = 6; * @return {?proto.google.protobuf.Timestamp} */ proto.activity.ProcessingCycles.prototype.getCreatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.setCreatedAt = function(value) { return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.clearCreatedAt = function() { return this.setCreatedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.ProcessingCycles.prototype.hasCreatedAt = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional google.protobuf.Timestamp updated_at = 7; * @return {?proto.google.protobuf.Timestamp} */ proto.activity.ProcessingCycles.prototype.getUpdatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.setUpdatedAt = function(value) { return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.ProcessingCycles} returns this */ proto.activity.ProcessingCycles.prototype.clearUpdatedAt = function() { return this.setUpdatedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.ProcessingCycles.prototype.hasUpdatedAt = function() { return jspb.Message.getField(this, 7) != 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.activity.CreateProcessingCycleRequest.prototype.toObject = function(opt_includeInstance) { return proto.activity.CreateProcessingCycleRequest.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.activity.CreateProcessingCycleRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.CreateProcessingCycleRequest.toObject = function(includeInstance, msg) { var f, obj = { cycleType: jspb.Message.getFieldWithDefault(msg, 1, ""), lastCompletedAt: (f = msg.getLastCompletedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), processedCount: jspb.Message.getFieldWithDefault(msg, 3, 0), cycleDurationMs: 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.activity.CreateProcessingCycleRequest} */ proto.activity.CreateProcessingCycleRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.CreateProcessingCycleRequest; return proto.activity.CreateProcessingCycleRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.CreateProcessingCycleRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.CreateProcessingCycleRequest} */ proto.activity.CreateProcessingCycleRequest.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.setCycleType(value); break; case 2: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setLastCompletedAt(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setProcessedCount(value); break; case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setCycleDurationMs(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.activity.CreateProcessingCycleRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.CreateProcessingCycleRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.activity.CreateProcessingCycleRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.CreateProcessingCycleRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCycleType(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getLastCompletedAt(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getProcessedCount(); if (f !== 0) { writer.writeInt32( 3, f ); } f = message.getCycleDurationMs(); if (f !== 0) { writer.writeInt64( 4, f ); } }; /** * optional string cycle_type = 1; * @return {string} */ proto.activity.CreateProcessingCycleRequest.prototype.getCycleType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.activity.CreateProcessingCycleRequest} returns this */ proto.activity.CreateProcessingCycleRequest.prototype.setCycleType = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional google.protobuf.Timestamp last_completed_at = 2; * @return {?proto.google.protobuf.Timestamp} */ proto.activity.CreateProcessingCycleRequest.prototype.getLastCompletedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.activity.CreateProcessingCycleRequest} returns this */ proto.activity.CreateProcessingCycleRequest.prototype.setLastCompletedAt = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.CreateProcessingCycleRequest} returns this */ proto.activity.CreateProcessingCycleRequest.prototype.clearLastCompletedAt = function() { return this.setLastCompletedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.CreateProcessingCycleRequest.prototype.hasLastCompletedAt = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional int32 processed_count = 3; * @return {number} */ proto.activity.CreateProcessingCycleRequest.prototype.getProcessedCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.activity.CreateProcessingCycleRequest} returns this */ proto.activity.CreateProcessingCycleRequest.prototype.setProcessedCount = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int64 cycle_duration_ms = 4; * @return {number} */ proto.activity.CreateProcessingCycleRequest.prototype.getCycleDurationMs = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.activity.CreateProcessingCycleRequest} returns this */ proto.activity.CreateProcessingCycleRequest.prototype.setCycleDurationMs = 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.activity.UpdateProcessingCycleRequest.prototype.toObject = function(opt_includeInstance) { return proto.activity.UpdateProcessingCycleRequest.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.activity.UpdateProcessingCycleRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.UpdateProcessingCycleRequest.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, 0), lastCompletedAt: (f = msg.getLastCompletedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), processedCount: jspb.Message.getFieldWithDefault(msg, 3, 0), cycleDurationMs: 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.activity.UpdateProcessingCycleRequest} */ proto.activity.UpdateProcessingCycleRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.UpdateProcessingCycleRequest; return proto.activity.UpdateProcessingCycleRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.UpdateProcessingCycleRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.UpdateProcessingCycleRequest} */ proto.activity.UpdateProcessingCycleRequest.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.setId(value); break; case 2: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setLastCompletedAt(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setProcessedCount(value); break; case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setCycleDurationMs(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.activity.UpdateProcessingCycleRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.UpdateProcessingCycleRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.activity.UpdateProcessingCycleRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.UpdateProcessingCycleRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getLastCompletedAt(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getProcessedCount(); if (f !== 0) { writer.writeInt32( 3, f ); } f = message.getCycleDurationMs(); if (f !== 0) { writer.writeInt64( 4, f ); } }; /** * optional int32 id = 1; * @return {number} */ proto.activity.UpdateProcessingCycleRequest.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.activity.UpdateProcessingCycleRequest} returns this */ proto.activity.UpdateProcessingCycleRequest.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional google.protobuf.Timestamp last_completed_at = 2; * @return {?proto.google.protobuf.Timestamp} */ proto.activity.UpdateProcessingCycleRequest.prototype.getLastCompletedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.activity.UpdateProcessingCycleRequest} returns this */ proto.activity.UpdateProcessingCycleRequest.prototype.setLastCompletedAt = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.UpdateProcessingCycleRequest} returns this */ proto.activity.UpdateProcessingCycleRequest.prototype.clearLastCompletedAt = function() { return this.setLastCompletedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.UpdateProcessingCycleRequest.prototype.hasLastCompletedAt = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional int32 processed_count = 3; * @return {number} */ proto.activity.UpdateProcessingCycleRequest.prototype.getProcessedCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.activity.UpdateProcessingCycleRequest} returns this */ proto.activity.UpdateProcessingCycleRequest.prototype.setProcessedCount = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int64 cycle_duration_ms = 4; * @return {number} */ proto.activity.UpdateProcessingCycleRequest.prototype.getCycleDurationMs = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.activity.UpdateProcessingCycleRequest} returns this */ proto.activity.UpdateProcessingCycleRequest.prototype.setCycleDurationMs = 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.activity.GetProcessingCycleByTypeRequest.prototype.toObject = function(opt_includeInstance) { return proto.activity.GetProcessingCycleByTypeRequest.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.activity.GetProcessingCycleByTypeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.GetProcessingCycleByTypeRequest.toObject = function(includeInstance, msg) { var f, obj = { cycleType: 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.activity.GetProcessingCycleByTypeRequest} */ proto.activity.GetProcessingCycleByTypeRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.GetProcessingCycleByTypeRequest; return proto.activity.GetProcessingCycleByTypeRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.GetProcessingCycleByTypeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.GetProcessingCycleByTypeRequest} */ proto.activity.GetProcessingCycleByTypeRequest.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.setCycleType(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.activity.GetProcessingCycleByTypeRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.GetProcessingCycleByTypeRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.activity.GetProcessingCycleByTypeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.GetProcessingCycleByTypeRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCycleType(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string cycle_type = 1; * @return {string} */ proto.activity.GetProcessingCycleByTypeRequest.prototype.getCycleType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.activity.GetProcessingCycleByTypeRequest} returns this */ proto.activity.GetProcessingCycleByTypeRequest.prototype.setCycleType = 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.activity.ProcessingCycleResponse.prototype.toObject = function(opt_includeInstance) { return proto.activity.ProcessingCycleResponse.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.activity.ProcessingCycleResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.ProcessingCycleResponse.toObject = function(includeInstance, msg) { var f, obj = { processingCycle: (f = msg.getProcessingCycle()) && proto.activity.ProcessingCycles.toObject(includeInstance, f), message: jspb.Message.getFieldWithDefault(msg, 2, ""), success: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.activity.ProcessingCycleResponse} */ proto.activity.ProcessingCycleResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.ProcessingCycleResponse; return proto.activity.ProcessingCycleResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.ProcessingCycleResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.ProcessingCycleResponse} */ proto.activity.ProcessingCycleResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.activity.ProcessingCycles; reader.readMessage(value,proto.activity.ProcessingCycles.deserializeBinaryFromReader); msg.setProcessingCycle(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setMessage(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setSuccess(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.activity.ProcessingCycleResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.ProcessingCycleResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.activity.ProcessingCycleResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.ProcessingCycleResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getProcessingCycle(); if (f != null) { writer.writeMessage( 1, f, proto.activity.ProcessingCycles.serializeBinaryToWriter ); } f = message.getMessage(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getSuccess(); if (f) { writer.writeBool( 3, f ); } }; /** * optional ProcessingCycles processing_cycle = 1; * @return {?proto.activity.ProcessingCycles} */ proto.activity.ProcessingCycleResponse.prototype.getProcessingCycle = function() { return /** @type{?proto.activity.ProcessingCycles} */ ( jspb.Message.getWrapperField(this, proto.activity.ProcessingCycles, 1)); }; /** * @param {?proto.activity.ProcessingCycles|undefined} value * @return {!proto.activity.ProcessingCycleResponse} returns this */ proto.activity.ProcessingCycleResponse.prototype.setProcessingCycle = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.ProcessingCycleResponse} returns this */ proto.activity.ProcessingCycleResponse.prototype.clearProcessingCycle = function() { return this.setProcessingCycle(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.ProcessingCycleResponse.prototype.hasProcessingCycle = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string message = 2; * @return {string} */ proto.activity.ProcessingCycleResponse.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.activity.ProcessingCycleResponse} returns this */ proto.activity.ProcessingCycleResponse.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional bool success = 3; * @return {boolean} */ proto.activity.ProcessingCycleResponse.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value * @return {!proto.activity.ProcessingCycleResponse} returns this */ proto.activity.ProcessingCycleResponse.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(this, 3, value); }; goog.object.extend(exports, proto.activity);