UNPKG

@ondewo/csi-client-nodejs

Version:

ONDEWO Communication System Integration (CSI) Client library for Nodejs

1,642 lines (1,431 loc) 64.6 kB
// source: ondewo/nlu/context.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_api_annotations_pb = require('../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); goog.object.extend(proto, google_protobuf_empty_pb); var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); goog.object.extend(proto, google_protobuf_field_mask_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.ondewo.nlu.Context', null, global); goog.exportSymbol('proto.ondewo.nlu.Context.Parameter', null, global); goog.exportSymbol('proto.ondewo.nlu.CreateContextRequest', null, global); goog.exportSymbol('proto.ondewo.nlu.DeleteAllContextsRequest', null, global); goog.exportSymbol('proto.ondewo.nlu.DeleteContextRequest', null, global); goog.exportSymbol('proto.ondewo.nlu.GetContextRequest', null, global); goog.exportSymbol('proto.ondewo.nlu.ListContextsRequest', null, global); goog.exportSymbol('proto.ondewo.nlu.ListContextsResponse', null, global); goog.exportSymbol('proto.ondewo.nlu.UpdateContextRequest', 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.ondewo.nlu.Context = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ondewo.nlu.Context, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ondewo.nlu.Context.displayName = 'proto.ondewo.nlu.Context'; } /** * 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.ondewo.nlu.Context.Parameter = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ondewo.nlu.Context.Parameter, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ondewo.nlu.Context.Parameter.displayName = 'proto.ondewo.nlu.Context.Parameter'; } /** * 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.ondewo.nlu.ListContextsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ondewo.nlu.ListContextsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ondewo.nlu.ListContextsRequest.displayName = 'proto.ondewo.nlu.ListContextsRequest'; } /** * 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.ondewo.nlu.ListContextsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.ondewo.nlu.ListContextsResponse.repeatedFields_, null); }; goog.inherits(proto.ondewo.nlu.ListContextsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ondewo.nlu.ListContextsResponse.displayName = 'proto.ondewo.nlu.ListContextsResponse'; } /** * 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.ondewo.nlu.GetContextRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ondewo.nlu.GetContextRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ondewo.nlu.GetContextRequest.displayName = 'proto.ondewo.nlu.GetContextRequest'; } /** * 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.ondewo.nlu.CreateContextRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ondewo.nlu.CreateContextRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ondewo.nlu.CreateContextRequest.displayName = 'proto.ondewo.nlu.CreateContextRequest'; } /** * 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.ondewo.nlu.UpdateContextRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ondewo.nlu.UpdateContextRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ondewo.nlu.UpdateContextRequest.displayName = 'proto.ondewo.nlu.UpdateContextRequest'; } /** * 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.ondewo.nlu.DeleteContextRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ondewo.nlu.DeleteContextRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ondewo.nlu.DeleteContextRequest.displayName = 'proto.ondewo.nlu.DeleteContextRequest'; } /** * 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.ondewo.nlu.DeleteAllContextsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ondewo.nlu.DeleteAllContextsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ondewo.nlu.DeleteAllContextsRequest.displayName = 'proto.ondewo.nlu.DeleteAllContextsRequest'; } 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.ondewo.nlu.Context.prototype.toObject = function(opt_includeInstance) { return proto.ondewo.nlu.Context.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.ondewo.nlu.Context} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.Context.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), lifespanCount: jspb.Message.getFieldWithDefault(msg, 2, 0), parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, proto.ondewo.nlu.Context.Parameter.toObject) : [], lifespanTime: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), modifiedAt: (f = msg.getModifiedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), createdBy: jspb.Message.getFieldWithDefault(msg, 7, ""), modifiedBy: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ondewo.nlu.Context} */ proto.ondewo.nlu.Context.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ondewo.nlu.Context; return proto.ondewo.nlu.Context.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ondewo.nlu.Context} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ondewo.nlu.Context} */ proto.ondewo.nlu.Context.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.setName(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setLifespanCount(value); break; case 3: var value = msg.getParametersMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.ondewo.nlu.Context.Parameter.deserializeBinaryFromReader, "", new proto.ondewo.nlu.Context.Parameter()); }); break; case 4: var value = /** @type {number} */ (reader.readFloat()); msg.setLifespanTime(value); break; case 5: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setCreatedAt(value); break; case 6: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setModifiedAt(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setCreatedBy(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setModifiedBy(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ondewo.nlu.Context.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.ondewo.nlu.Context.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ondewo.nlu.Context} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.Context.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getLifespanCount(); if (f !== 0) { writer.writeInt32( 2, f ); } f = message.getParametersMap(true); if (f && f.getLength() > 0) { f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.ondewo.nlu.Context.Parameter.serializeBinaryToWriter); } f = message.getLifespanTime(); if (f !== 0.0) { writer.writeFloat( 4, f ); } f = message.getCreatedAt(); if (f != null) { writer.writeMessage( 5, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getModifiedAt(); if (f != null) { writer.writeMessage( 6, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getCreatedBy(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getModifiedBy(); if (f.length > 0) { writer.writeString( 8, f ); } }; 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.ondewo.nlu.Context.Parameter.prototype.toObject = function(opt_includeInstance) { return proto.ondewo.nlu.Context.Parameter.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.ondewo.nlu.Context.Parameter} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.Context.Parameter.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), displayName: jspb.Message.getFieldWithDefault(msg, 2, ""), value: jspb.Message.getFieldWithDefault(msg, 3, ""), valueOriginal: jspb.Message.getFieldWithDefault(msg, 4, ""), createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), modifiedAt: (f = msg.getModifiedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), createdBy: jspb.Message.getFieldWithDefault(msg, 7, ""), modifiedBy: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ondewo.nlu.Context.Parameter} */ proto.ondewo.nlu.Context.Parameter.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ondewo.nlu.Context.Parameter; return proto.ondewo.nlu.Context.Parameter.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ondewo.nlu.Context.Parameter} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ondewo.nlu.Context.Parameter} */ proto.ondewo.nlu.Context.Parameter.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.setName(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setDisplayName(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setValue(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setValueOriginal(value); break; case 5: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setCreatedAt(value); break; case 6: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setModifiedAt(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setCreatedBy(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setModifiedBy(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ondewo.nlu.Context.Parameter.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.ondewo.nlu.Context.Parameter.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ondewo.nlu.Context.Parameter} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.Context.Parameter.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getDisplayName(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getValue(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getValueOriginal(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getCreatedAt(); if (f != null) { writer.writeMessage( 5, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getModifiedAt(); if (f != null) { writer.writeMessage( 6, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getCreatedBy(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getModifiedBy(); if (f.length > 0) { writer.writeString( 8, f ); } }; /** * optional string name = 1; * @return {string} */ proto.ondewo.nlu.Context.Parameter.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string display_name = 2; * @return {string} */ proto.ondewo.nlu.Context.Parameter.prototype.getDisplayName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.setDisplayName = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string value = 3; * @return {string} */ proto.ondewo.nlu.Context.Parameter.prototype.getValue = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.setValue = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string value_original = 4; * @return {string} */ proto.ondewo.nlu.Context.Parameter.prototype.getValueOriginal = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.setValueOriginal = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional google.protobuf.Timestamp created_at = 5; * @return {?proto.google.protobuf.Timestamp} */ proto.ondewo.nlu.Context.Parameter.prototype.getCreatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.setCreatedAt = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.clearCreatedAt = function() { return this.setCreatedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.ondewo.nlu.Context.Parameter.prototype.hasCreatedAt = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional google.protobuf.Timestamp modified_at = 6; * @return {?proto.google.protobuf.Timestamp} */ proto.ondewo.nlu.Context.Parameter.prototype.getModifiedAt = 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.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.setModifiedAt = function(value) { return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. * @return {!proto.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.clearModifiedAt = function() { return this.setModifiedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.ondewo.nlu.Context.Parameter.prototype.hasModifiedAt = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional string created_by = 7; * @return {string} */ proto.ondewo.nlu.Context.Parameter.prototype.getCreatedBy = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.setCreatedBy = function(value) { return jspb.Message.setProto3StringField(this, 7, value); }; /** * optional string modified_by = 8; * @return {string} */ proto.ondewo.nlu.Context.Parameter.prototype.getModifiedBy = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.Context.Parameter} returns this */ proto.ondewo.nlu.Context.Parameter.prototype.setModifiedBy = function(value) { return jspb.Message.setProto3StringField(this, 8, value); }; /** * optional string name = 1; * @return {string} */ proto.ondewo.nlu.Context.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional int32 lifespan_count = 2; * @return {number} */ proto.ondewo.nlu.Context.prototype.getLifespanCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.setLifespanCount = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * map<string, Parameter> parameters = 3; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<string,!proto.ondewo.nlu.Context.Parameter>} */ proto.ondewo.nlu.Context.prototype.getParametersMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<string,!proto.ondewo.nlu.Context.Parameter>} */ ( jspb.Message.getMapField(this, 3, opt_noLazyCreate, proto.ondewo.nlu.Context.Parameter)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.clearParametersMap = function() { this.getParametersMap().clear(); return this;}; /** * optional float lifespan_time = 4; * @return {number} */ proto.ondewo.nlu.Context.prototype.getLifespanTime = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); }; /** * @param {number} value * @return {!proto.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.setLifespanTime = function(value) { return jspb.Message.setProto3FloatField(this, 4, value); }; /** * optional google.protobuf.Timestamp created_at = 5; * @return {?proto.google.protobuf.Timestamp} */ proto.ondewo.nlu.Context.prototype.getCreatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.setCreatedAt = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.clearCreatedAt = function() { return this.setCreatedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.ondewo.nlu.Context.prototype.hasCreatedAt = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional google.protobuf.Timestamp modified_at = 6; * @return {?proto.google.protobuf.Timestamp} */ proto.ondewo.nlu.Context.prototype.getModifiedAt = 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.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.setModifiedAt = function(value) { return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. * @return {!proto.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.clearModifiedAt = function() { return this.setModifiedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.ondewo.nlu.Context.prototype.hasModifiedAt = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional string created_by = 7; * @return {string} */ proto.ondewo.nlu.Context.prototype.getCreatedBy = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.setCreatedBy = function(value) { return jspb.Message.setProto3StringField(this, 7, value); }; /** * optional string modified_by = 8; * @return {string} */ proto.ondewo.nlu.Context.prototype.getModifiedBy = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.Context} returns this */ proto.ondewo.nlu.Context.prototype.setModifiedBy = function(value) { return jspb.Message.setProto3StringField(this, 8, 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.ondewo.nlu.ListContextsRequest.prototype.toObject = function(opt_includeInstance) { return proto.ondewo.nlu.ListContextsRequest.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.ondewo.nlu.ListContextsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.ListContextsRequest.toObject = function(includeInstance, msg) { var f, obj = { sessionId: jspb.Message.getFieldWithDefault(msg, 1, ""), pageToken: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ondewo.nlu.ListContextsRequest} */ proto.ondewo.nlu.ListContextsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ondewo.nlu.ListContextsRequest; return proto.ondewo.nlu.ListContextsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ondewo.nlu.ListContextsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ondewo.nlu.ListContextsRequest} */ proto.ondewo.nlu.ListContextsRequest.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.setSessionId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setPageToken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ondewo.nlu.ListContextsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.ondewo.nlu.ListContextsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ondewo.nlu.ListContextsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.ListContextsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSessionId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getPageToken(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional string session_id = 1; * @return {string} */ proto.ondewo.nlu.ListContextsRequest.prototype.getSessionId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.ListContextsRequest} returns this */ proto.ondewo.nlu.ListContextsRequest.prototype.setSessionId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string page_token = 3; * @return {string} */ proto.ondewo.nlu.ListContextsRequest.prototype.getPageToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.ListContextsRequest} returns this */ proto.ondewo.nlu.ListContextsRequest.prototype.setPageToken = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.ondewo.nlu.ListContextsResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.ondewo.nlu.ListContextsResponse.prototype.toObject = function(opt_includeInstance) { return proto.ondewo.nlu.ListContextsResponse.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.ondewo.nlu.ListContextsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.ListContextsResponse.toObject = function(includeInstance, msg) { var f, obj = { contextsList: jspb.Message.toObjectList(msg.getContextsList(), proto.ondewo.nlu.Context.toObject, includeInstance), nextPageToken: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ondewo.nlu.ListContextsResponse} */ proto.ondewo.nlu.ListContextsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ondewo.nlu.ListContextsResponse; return proto.ondewo.nlu.ListContextsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ondewo.nlu.ListContextsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ondewo.nlu.ListContextsResponse} */ proto.ondewo.nlu.ListContextsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.ondewo.nlu.Context; reader.readMessage(value,proto.ondewo.nlu.Context.deserializeBinaryFromReader); msg.addContexts(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setNextPageToken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ondewo.nlu.ListContextsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.ondewo.nlu.ListContextsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ondewo.nlu.ListContextsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.ListContextsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getContextsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.ondewo.nlu.Context.serializeBinaryToWriter ); } f = message.getNextPageToken(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * repeated Context contexts = 1; * @return {!Array<!proto.ondewo.nlu.Context>} */ proto.ondewo.nlu.ListContextsResponse.prototype.getContextsList = function() { return /** @type{!Array<!proto.ondewo.nlu.Context>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.ondewo.nlu.Context, 1)); }; /** * @param {!Array<!proto.ondewo.nlu.Context>} value * @return {!proto.ondewo.nlu.ListContextsResponse} returns this */ proto.ondewo.nlu.ListContextsResponse.prototype.setContextsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.ondewo.nlu.Context=} opt_value * @param {number=} opt_index * @return {!proto.ondewo.nlu.Context} */ proto.ondewo.nlu.ListContextsResponse.prototype.addContexts = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ondewo.nlu.Context, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.ondewo.nlu.ListContextsResponse} returns this */ proto.ondewo.nlu.ListContextsResponse.prototype.clearContextsList = function() { return this.setContextsList([]); }; /** * optional string next_page_token = 2; * @return {string} */ proto.ondewo.nlu.ListContextsResponse.prototype.getNextPageToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.ListContextsResponse} returns this */ proto.ondewo.nlu.ListContextsResponse.prototype.setNextPageToken = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.ondewo.nlu.GetContextRequest.prototype.toObject = function(opt_includeInstance) { return proto.ondewo.nlu.GetContextRequest.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.ondewo.nlu.GetContextRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.GetContextRequest.toObject = function(includeInstance, msg) { var f, obj = { name: 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.ondewo.nlu.GetContextRequest} */ proto.ondewo.nlu.GetContextRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ondewo.nlu.GetContextRequest; return proto.ondewo.nlu.GetContextRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ondewo.nlu.GetContextRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ondewo.nlu.GetContextRequest} */ proto.ondewo.nlu.GetContextRequest.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.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ondewo.nlu.GetContextRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.ondewo.nlu.GetContextRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ondewo.nlu.GetContextRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.GetContextRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string name = 1; * @return {string} */ proto.ondewo.nlu.GetContextRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.GetContextRequest} returns this */ proto.ondewo.nlu.GetContextRequest.prototype.setName = 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.ondewo.nlu.CreateContextRequest.prototype.toObject = function(opt_includeInstance) { return proto.ondewo.nlu.CreateContextRequest.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.ondewo.nlu.CreateContextRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.CreateContextRequest.toObject = function(includeInstance, msg) { var f, obj = { sessionId: jspb.Message.getFieldWithDefault(msg, 1, ""), context: (f = msg.getContext()) && proto.ondewo.nlu.Context.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.ondewo.nlu.CreateContextRequest} */ proto.ondewo.nlu.CreateContextRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ondewo.nlu.CreateContextRequest; return proto.ondewo.nlu.CreateContextRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ondewo.nlu.CreateContextRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ondewo.nlu.CreateContextRequest} */ proto.ondewo.nlu.CreateContextRequest.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.setSessionId(value); break; case 2: var value = new proto.ondewo.nlu.Context; reader.readMessage(value,proto.ondewo.nlu.Context.deserializeBinaryFromReader); msg.setContext(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ondewo.nlu.CreateContextRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.ondewo.nlu.CreateContextRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ondewo.nlu.CreateContextRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ondewo.nlu.CreateContextRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSessionId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getContext(); if (f != null) { writer.writeMessage( 2, f, proto.ondewo.nlu.Context.serializeBinaryToWriter ); } }; /** * optional string session_id = 1; * @return {string} */ proto.ondewo.nlu.CreateContextRequest.prototype.getSessionId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.ondewo.nlu.CreateContextRequest} returns this */ proto.ondewo.nlu.CreateContextRequest.prototype.setSessionId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional Context context = 2; * @return {?proto.ondewo.nlu.Context} */ proto.ondewo.nlu.CreateContextRequest.prototype.getContext = function() { return /** @type{?proto.ondewo.nlu.Context} */ ( jspb.Message.getWrapperField(this, proto.ondewo.nlu.Context, 2)); }; /** * @param {?proto.ondewo.nlu.Context|undefined} value * @return {!proto.ondewo.nlu.CreateContextRequest} returns this */ proto.ondewo.nlu.CreateContextRequest.prototype.setContext = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.ondewo.nlu.CreateContextRequest} retu