UNPKG

pip-services-email-node

Version:
1,689 lines (1,456 loc) 56.2 kB
/** * @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')(); goog.exportSymbol('proto.email_v1.EmailEmptyReply', null, global); goog.exportSymbol('proto.email_v1.EmailMessage', null, global); goog.exportSymbol('proto.email_v1.EmailMessageRequest', null, global); goog.exportSymbol('proto.email_v1.EmailMessageWithRecipientRequest', null, global); goog.exportSymbol('proto.email_v1.EmailMessageWithRecipientsRequest', null, global); goog.exportSymbol('proto.email_v1.EmailRecipient', null, global); goog.exportSymbol('proto.email_v1.ErrorDescription', 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.email_v1.ErrorDescription = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.email_v1.ErrorDescription, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.email_v1.ErrorDescription.displayName = 'proto.email_v1.ErrorDescription'; } /** * 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.email_v1.EmailMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.email_v1.EmailMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.email_v1.EmailMessage.displayName = 'proto.email_v1.EmailMessage'; } /** * 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.email_v1.EmailRecipient = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.email_v1.EmailRecipient, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.email_v1.EmailRecipient.displayName = 'proto.email_v1.EmailRecipient'; } /** * 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.email_v1.EmailMessageRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.email_v1.EmailMessageRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.email_v1.EmailMessageRequest.displayName = 'proto.email_v1.EmailMessageRequest'; } /** * 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.email_v1.EmailMessageWithRecipientRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.email_v1.EmailMessageWithRecipientRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.email_v1.EmailMessageWithRecipientRequest.displayName = 'proto.email_v1.EmailMessageWithRecipientRequest'; } /** * 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.email_v1.EmailMessageWithRecipientsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.email_v1.EmailMessageWithRecipientsRequest.repeatedFields_, null); }; goog.inherits(proto.email_v1.EmailMessageWithRecipientsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.email_v1.EmailMessageWithRecipientsRequest.displayName = 'proto.email_v1.EmailMessageWithRecipientsRequest'; } /** * 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.email_v1.EmailEmptyReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.email_v1.EmailEmptyReply, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.email_v1.EmailEmptyReply.displayName = 'proto.email_v1.EmailEmptyReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.email_v1.ErrorDescription.prototype.toObject = function(opt_includeInstance) { return proto.email_v1.ErrorDescription.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.email_v1.ErrorDescription} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.ErrorDescription.toObject = function(includeInstance, msg) { var f, obj = { type: jspb.Message.getFieldWithDefault(msg, 1, ""), category: jspb.Message.getFieldWithDefault(msg, 2, ""), code: jspb.Message.getFieldWithDefault(msg, 3, ""), correlationId: jspb.Message.getFieldWithDefault(msg, 4, ""), status: jspb.Message.getFieldWithDefault(msg, 5, ""), message: jspb.Message.getFieldWithDefault(msg, 6, ""), cause: jspb.Message.getFieldWithDefault(msg, 7, ""), stackTrace: jspb.Message.getFieldWithDefault(msg, 8, ""), detailsMap: (f = msg.getDetailsMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.email_v1.ErrorDescription} */ proto.email_v1.ErrorDescription.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.email_v1.ErrorDescription; return proto.email_v1.ErrorDescription.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.email_v1.ErrorDescription} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.email_v1.ErrorDescription} */ proto.email_v1.ErrorDescription.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.setType(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setCategory(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setCode(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setCorrelationId(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setStatus(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setMessage(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setCause(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setStackTrace(value); break; case 9: var value = msg.getDetailsMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, ""); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.email_v1.ErrorDescription.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.email_v1.ErrorDescription.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.email_v1.ErrorDescription} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.ErrorDescription.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getType(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getCategory(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getCode(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getCorrelationId(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getStatus(); if (f.length > 0) { writer.writeString( 5, f ); } f = message.getMessage(); if (f.length > 0) { writer.writeString( 6, f ); } f = message.getCause(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getStackTrace(); if (f.length > 0) { writer.writeString( 8, f ); } f = message.getDetailsMap(true); if (f && f.getLength() > 0) { f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } }; /** * optional string type = 1; * @return {string} */ proto.email_v1.ErrorDescription.prototype.getType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.email_v1.ErrorDescription.prototype.setType = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string category = 2; * @return {string} */ proto.email_v1.ErrorDescription.prototype.getCategory = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.email_v1.ErrorDescription.prototype.setCategory = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string code = 3; * @return {string} */ proto.email_v1.ErrorDescription.prototype.getCode = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ proto.email_v1.ErrorDescription.prototype.setCode = function(value) { jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string correlation_id = 4; * @return {string} */ proto.email_v1.ErrorDescription.prototype.getCorrelationId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** @param {string} value */ proto.email_v1.ErrorDescription.prototype.setCorrelationId = function(value) { jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string status = 5; * @return {string} */ proto.email_v1.ErrorDescription.prototype.getStatus = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** @param {string} value */ proto.email_v1.ErrorDescription.prototype.setStatus = function(value) { jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string message = 6; * @return {string} */ proto.email_v1.ErrorDescription.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** @param {string} value */ proto.email_v1.ErrorDescription.prototype.setMessage = function(value) { jspb.Message.setProto3StringField(this, 6, value); }; /** * optional string cause = 7; * @return {string} */ proto.email_v1.ErrorDescription.prototype.getCause = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** @param {string} value */ proto.email_v1.ErrorDescription.prototype.setCause = function(value) { jspb.Message.setProto3StringField(this, 7, value); }; /** * optional string stack_trace = 8; * @return {string} */ proto.email_v1.ErrorDescription.prototype.getStackTrace = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** @param {string} value */ proto.email_v1.ErrorDescription.prototype.setStackTrace = function(value) { jspb.Message.setProto3StringField(this, 8, value); }; /** * map<string, string> details = 9; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<string,string>} */ proto.email_v1.ErrorDescription.prototype.getDetailsMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<string,string>} */ ( jspb.Message.getMapField(this, 9, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. */ proto.email_v1.ErrorDescription.prototype.clearDetailsMap = function() { this.getDetailsMap().clear(); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.email_v1.EmailMessage.prototype.toObject = function(opt_includeInstance) { return proto.email_v1.EmailMessage.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.email_v1.EmailMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailMessage.toObject = function(includeInstance, msg) { var f, obj = { from: jspb.Message.getFieldWithDefault(msg, 1, ""), cc: jspb.Message.getFieldWithDefault(msg, 2, ""), bcc: jspb.Message.getFieldWithDefault(msg, 3, ""), to: jspb.Message.getFieldWithDefault(msg, 4, ""), replyTo: jspb.Message.getFieldWithDefault(msg, 5, ""), subject: jspb.Message.getFieldWithDefault(msg, 6, ""), text: jspb.Message.getFieldWithDefault(msg, 7, ""), html: 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.email_v1.EmailMessage} */ proto.email_v1.EmailMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.email_v1.EmailMessage; return proto.email_v1.EmailMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.email_v1.EmailMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.email_v1.EmailMessage} */ proto.email_v1.EmailMessage.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.setFrom(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setCc(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setBcc(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setTo(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setReplyTo(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setSubject(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setText(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setHtml(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.email_v1.EmailMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.email_v1.EmailMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.email_v1.EmailMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFrom(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getCc(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getBcc(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getTo(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getReplyTo(); if (f.length > 0) { writer.writeString( 5, f ); } f = message.getSubject(); if (f.length > 0) { writer.writeString( 6, f ); } f = message.getText(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getHtml(); if (f.length > 0) { writer.writeString( 8, f ); } }; /** * optional string from = 1; * @return {string} */ proto.email_v1.EmailMessage.prototype.getFrom = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.email_v1.EmailMessage.prototype.setFrom = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string cc = 2; * @return {string} */ proto.email_v1.EmailMessage.prototype.getCc = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.email_v1.EmailMessage.prototype.setCc = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string bcc = 3; * @return {string} */ proto.email_v1.EmailMessage.prototype.getBcc = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ proto.email_v1.EmailMessage.prototype.setBcc = function(value) { jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string to = 4; * @return {string} */ proto.email_v1.EmailMessage.prototype.getTo = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** @param {string} value */ proto.email_v1.EmailMessage.prototype.setTo = function(value) { jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string reply_to = 5; * @return {string} */ proto.email_v1.EmailMessage.prototype.getReplyTo = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** @param {string} value */ proto.email_v1.EmailMessage.prototype.setReplyTo = function(value) { jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string subject = 6; * @return {string} */ proto.email_v1.EmailMessage.prototype.getSubject = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** @param {string} value */ proto.email_v1.EmailMessage.prototype.setSubject = function(value) { jspb.Message.setProto3StringField(this, 6, value); }; /** * optional string text = 7; * @return {string} */ proto.email_v1.EmailMessage.prototype.getText = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** @param {string} value */ proto.email_v1.EmailMessage.prototype.setText = function(value) { jspb.Message.setProto3StringField(this, 7, value); }; /** * optional string html = 8; * @return {string} */ proto.email_v1.EmailMessage.prototype.getHtml = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** @param {string} value */ proto.email_v1.EmailMessage.prototype.setHtml = function(value) { jspb.Message.setProto3StringField(this, 8, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.email_v1.EmailRecipient.prototype.toObject = function(opt_includeInstance) { return proto.email_v1.EmailRecipient.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.email_v1.EmailRecipient} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailRecipient.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), name: jspb.Message.getFieldWithDefault(msg, 2, ""), email: jspb.Message.getFieldWithDefault(msg, 3, ""), language: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.email_v1.EmailRecipient} */ proto.email_v1.EmailRecipient.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.email_v1.EmailRecipient; return proto.email_v1.EmailRecipient.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.email_v1.EmailRecipient} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.email_v1.EmailRecipient} */ proto.email_v1.EmailRecipient.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.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setEmail(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setLanguage(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.email_v1.EmailRecipient.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.email_v1.EmailRecipient.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.email_v1.EmailRecipient} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailRecipient.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getName(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getEmail(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getLanguage(); if (f.length > 0) { writer.writeString( 4, f ); } }; /** * optional string id = 1; * @return {string} */ proto.email_v1.EmailRecipient.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.email_v1.EmailRecipient.prototype.setId = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string name = 2; * @return {string} */ proto.email_v1.EmailRecipient.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.email_v1.EmailRecipient.prototype.setName = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string email = 3; * @return {string} */ proto.email_v1.EmailRecipient.prototype.getEmail = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ proto.email_v1.EmailRecipient.prototype.setEmail = function(value) { jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string language = 4; * @return {string} */ proto.email_v1.EmailRecipient.prototype.getLanguage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** @param {string} value */ proto.email_v1.EmailRecipient.prototype.setLanguage = function(value) { jspb.Message.setProto3StringField(this, 4, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.email_v1.EmailMessageRequest.prototype.toObject = function(opt_includeInstance) { return proto.email_v1.EmailMessageRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.email_v1.EmailMessageRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailMessageRequest.toObject = function(includeInstance, msg) { var f, obj = { correlationId: jspb.Message.getFieldWithDefault(msg, 1, ""), message: (f = msg.getMessage()) && proto.email_v1.EmailMessage.toObject(includeInstance, f), parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.email_v1.EmailMessageRequest} */ proto.email_v1.EmailMessageRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.email_v1.EmailMessageRequest; return proto.email_v1.EmailMessageRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.email_v1.EmailMessageRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.email_v1.EmailMessageRequest} */ proto.email_v1.EmailMessageRequest.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.setCorrelationId(value); break; case 2: var value = new proto.email_v1.EmailMessage; reader.readMessage(value,proto.email_v1.EmailMessage.deserializeBinaryFromReader); msg.setMessage(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.readString, null, ""); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.email_v1.EmailMessageRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.email_v1.EmailMessageRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.email_v1.EmailMessageRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailMessageRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCorrelationId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getMessage(); if (f != null) { writer.writeMessage( 2, f, proto.email_v1.EmailMessage.serializeBinaryToWriter ); } f = message.getParametersMap(true); if (f && f.getLength() > 0) { f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } }; /** * optional string correlation_id = 1; * @return {string} */ proto.email_v1.EmailMessageRequest.prototype.getCorrelationId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.email_v1.EmailMessageRequest.prototype.setCorrelationId = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional EmailMessage message = 2; * @return {?proto.email_v1.EmailMessage} */ proto.email_v1.EmailMessageRequest.prototype.getMessage = function() { return /** @type{?proto.email_v1.EmailMessage} */ ( jspb.Message.getWrapperField(this, proto.email_v1.EmailMessage, 2)); }; /** @param {?proto.email_v1.EmailMessage|undefined} value */ proto.email_v1.EmailMessageRequest.prototype.setMessage = function(value) { jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. */ proto.email_v1.EmailMessageRequest.prototype.clearMessage = function() { this.setMessage(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.email_v1.EmailMessageRequest.prototype.hasMessage = function() { return jspb.Message.getField(this, 2) != null; }; /** * map<string, string> parameters = 3; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<string,string>} */ proto.email_v1.EmailMessageRequest.prototype.getParametersMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<string,string>} */ ( jspb.Message.getMapField(this, 3, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. */ proto.email_v1.EmailMessageRequest.prototype.clearParametersMap = function() { this.getParametersMap().clear(); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.toObject = function(opt_includeInstance) { return proto.email_v1.EmailMessageWithRecipientRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.email_v1.EmailMessageWithRecipientRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailMessageWithRecipientRequest.toObject = function(includeInstance, msg) { var f, obj = { correlationId: jspb.Message.getFieldWithDefault(msg, 1, ""), message: (f = msg.getMessage()) && proto.email_v1.EmailMessage.toObject(includeInstance, f), parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, undefined) : [], recipient: (f = msg.getRecipient()) && proto.email_v1.EmailRecipient.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.email_v1.EmailMessageWithRecipientRequest} */ proto.email_v1.EmailMessageWithRecipientRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.email_v1.EmailMessageWithRecipientRequest; return proto.email_v1.EmailMessageWithRecipientRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.email_v1.EmailMessageWithRecipientRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.email_v1.EmailMessageWithRecipientRequest} */ proto.email_v1.EmailMessageWithRecipientRequest.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.setCorrelationId(value); break; case 2: var value = new proto.email_v1.EmailMessage; reader.readMessage(value,proto.email_v1.EmailMessage.deserializeBinaryFromReader); msg.setMessage(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.readString, null, ""); }); break; case 4: var value = new proto.email_v1.EmailRecipient; reader.readMessage(value,proto.email_v1.EmailRecipient.deserializeBinaryFromReader); msg.setRecipient(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.email_v1.EmailMessageWithRecipientRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.email_v1.EmailMessageWithRecipientRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailMessageWithRecipientRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCorrelationId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getMessage(); if (f != null) { writer.writeMessage( 2, f, proto.email_v1.EmailMessage.serializeBinaryToWriter ); } f = message.getParametersMap(true); if (f && f.getLength() > 0) { f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getRecipient(); if (f != null) { writer.writeMessage( 4, f, proto.email_v1.EmailRecipient.serializeBinaryToWriter ); } }; /** * optional string correlation_id = 1; * @return {string} */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.getCorrelationId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.setCorrelationId = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional EmailMessage message = 2; * @return {?proto.email_v1.EmailMessage} */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.getMessage = function() { return /** @type{?proto.email_v1.EmailMessage} */ ( jspb.Message.getWrapperField(this, proto.email_v1.EmailMessage, 2)); }; /** @param {?proto.email_v1.EmailMessage|undefined} value */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.setMessage = function(value) { jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.clearMessage = function() { this.setMessage(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.hasMessage = function() { return jspb.Message.getField(this, 2) != null; }; /** * map<string, string> parameters = 3; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<string,string>} */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.getParametersMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<string,string>} */ ( jspb.Message.getMapField(this, 3, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.clearParametersMap = function() { this.getParametersMap().clear(); }; /** * optional EmailRecipient recipient = 4; * @return {?proto.email_v1.EmailRecipient} */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.getRecipient = function() { return /** @type{?proto.email_v1.EmailRecipient} */ ( jspb.Message.getWrapperField(this, proto.email_v1.EmailRecipient, 4)); }; /** @param {?proto.email_v1.EmailRecipient|undefined} value */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.setRecipient = function(value) { jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.clearRecipient = function() { this.setRecipient(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.email_v1.EmailMessageWithRecipientRequest.prototype.hasRecipient = function() { return jspb.Message.getField(this, 4) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.email_v1.EmailMessageWithRecipientsRequest.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.email_v1.EmailMessageWithRecipientsRequest.prototype.toObject = function(opt_includeInstance) { return proto.email_v1.EmailMessageWithRecipientsRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.email_v1.EmailMessageWithRecipientsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailMessageWithRecipientsRequest.toObject = function(includeInstance, msg) { var f, obj = { correlationId: jspb.Message.getFieldWithDefault(msg, 1, ""), message: (f = msg.getMessage()) && proto.email_v1.EmailMessage.toObject(includeInstance, f), parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, undefined) : [], recipientsList: jspb.Message.toObjectList(msg.getRecipientsList(), proto.email_v1.EmailRecipient.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.email_v1.EmailMessageWithRecipientsRequest} */ proto.email_v1.EmailMessageWithRecipientsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.email_v1.EmailMessageWithRecipientsRequest; return proto.email_v1.EmailMessageWithRecipientsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.email_v1.EmailMessageWithRecipientsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.email_v1.EmailMessageWithRecipientsRequest} */ proto.email_v1.EmailMessageWithRecipientsRequest.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.setCorrelationId(value); break; case 2: var value = new proto.email_v1.EmailMessage; reader.readMessage(value,proto.email_v1.EmailMessage.deserializeBinaryFromReader); msg.setMessage(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.readString, null, ""); }); break; case 4: var value = new proto.email_v1.EmailRecipient; reader.readMessage(value,proto.email_v1.EmailRecipient.deserializeBinaryFromReader); msg.addRecipients(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.email_v1.EmailMessageWithRecipientsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.email_v1.EmailMessageWithRecipientsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.email_v1.EmailMessageWithRecipientsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.email_v1.EmailMessageWithRecipientsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCorrelationId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getMessage(); if (f != null) { writer.writeMessage( 2, f, proto.email_v1.EmailMessage.serializeBinaryToWriter ); } f = message.getParametersMap(true); if (f && f.getLength() > 0) { f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getRecipientsList(); if (f.length > 0) { writer.writeRepeatedMessage( 4, f, proto.email_v1.EmailRecipient.serializeBinaryToWriter ); } }; /** * optional string correlation_id = 1; * @return {string} */ proto.email_v1.EmailMessageWithRecipientsRequest.prototype.getCorrelationId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.email_v1.EmailMessageWithRecipientsRequest.prototype.setCorrelationId = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional EmailMessage message = 2; * @return {?proto.email_v1.EmailMessage} */ proto.email_v1.EmailMessageWithRecipientsRequest.prototype.getMessage = function() { return /** @type{?proto.email_v1.EmailMessage} */ ( jspb.Message.getWrapperField(this, proto.email_v1.EmailMessage, 2)); }; /** @param {?proto.email_v1.EmailMessage|undefined} value */ proto.email_v1.EmailMessageWithRecipientsRequest.prototype.setMessage = function(value) { jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. */ proto.email_v1.EmailMessageWithRecipientsRequest.prototype.clearMessage = function() { this.setMessage(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.email_v1.EmailMessageWithRecipientsRequest.prototype.hasMessage = functi