| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- /**
- * @fileoverview
- * @enhanceable
- * @public
- */
- // GENERATED CODE -- DO NOT EDIT!
- goog.provide('proto.transit_realtime.TranslatedString');
- goog.provide('proto.transit_realtime.TranslatedString.Translation');
- goog.require('jspb.Message');
- /**
- * 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.transit_realtime.TranslatedString = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, 2, proto.transit_realtime.TranslatedString.repeatedFields_, null);
- };
- goog.inherits(proto.transit_realtime.TranslatedString, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- proto.transit_realtime.TranslatedString.displayName = 'proto.transit_realtime.TranslatedString';
- }
- /**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
- proto.transit_realtime.TranslatedString.repeatedFields_ = [1];
- 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.transit_realtime.TranslatedString.prototype.toObject = function(opt_includeInstance) {
- return proto.transit_realtime.TranslatedString.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.transit_realtime.TranslatedString} msg The msg instance to transform.
- * @return {!Object}
- */
- proto.transit_realtime.TranslatedString.toObject = function(includeInstance, msg) {
- var f, obj = {
- translationList: jspb.Message.toObjectList(msg.getTranslationList(),
- proto.transit_realtime.TranslatedString.Translation.toObject, includeInstance)
- };
- jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
- proto.transit_realtime.TranslatedString.extensions, proto.transit_realtime.TranslatedString.prototype.getExtension,
- includeInstance);
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Creates a deep clone of this proto. No data is shared with the original.
- * @return {!proto.transit_realtime.TranslatedString} The clone.
- */
- proto.transit_realtime.TranslatedString.prototype.cloneMessage = function() {
- return /** @type {!proto.transit_realtime.TranslatedString} */ (jspb.Message.cloneMessage(this));
- };
- /**
- * repeated Translation translation = 1;
- * If you change this array by adding, removing or replacing elements, or if you
- * replace the array itself, then you must call the setter to update it.
- * @return {!Array.<!proto.transit_realtime.TranslatedString.Translation>}
- */
- proto.transit_realtime.TranslatedString.prototype.getTranslationList = function() {
- return /** @type{!Array.<!proto.transit_realtime.TranslatedString.Translation>} */ (
- jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.TranslatedString.Translation, 1));
- };
- /** @param {Array.<!proto.transit_realtime.TranslatedString.Translation>} value */
- proto.transit_realtime.TranslatedString.prototype.setTranslationList = function(value) {
- jspb.Message.setRepeatedWrapperField(this, 1, value);
- };
- proto.transit_realtime.TranslatedString.prototype.clearTranslationList = function() {
- this.setTranslationList([]);
- };
- /**
- * The extensions registered with this message class. This is a map of
- * extension field number to fieldInfo object.
- *
- * For example:
- * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
- *
- * fieldName contains the JsCompiler renamed field name property so that it
- * works in OPTIMIZED mode.
- *
- * @type {!Object.<number, jspb.ExtensionFieldInfo>}
- */
- proto.transit_realtime.TranslatedString.extensions = {};
- /**
- * 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.transit_realtime.TranslatedString.Translation = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, 3, null, null);
- };
- goog.inherits(proto.transit_realtime.TranslatedString.Translation, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- proto.transit_realtime.TranslatedString.Translation.displayName = 'proto.transit_realtime.TranslatedString.Translation';
- }
- 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.transit_realtime.TranslatedString.Translation.prototype.toObject = function(opt_includeInstance) {
- return proto.transit_realtime.TranslatedString.Translation.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.transit_realtime.TranslatedString.Translation} msg The msg instance to transform.
- * @return {!Object}
- */
- proto.transit_realtime.TranslatedString.Translation.toObject = function(includeInstance, msg) {
- var f, obj = {
- text: jspb.Message.getField(msg, 1),
- language: jspb.Message.getField(msg, 2)
- };
- jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
- proto.transit_realtime.TranslatedString.Translation.extensions, proto.transit_realtime.TranslatedString.Translation.prototype.getExtension,
- includeInstance);
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Creates a deep clone of this proto. No data is shared with the original.
- * @return {!proto.transit_realtime.TranslatedString.Translation} The clone.
- */
- proto.transit_realtime.TranslatedString.Translation.prototype.cloneMessage = function() {
- return /** @type {!proto.transit_realtime.TranslatedString.Translation} */ (jspb.Message.cloneMessage(this));
- };
- /**
- * required string text = 1;
- * @return {string}
- */
- proto.transit_realtime.TranslatedString.Translation.prototype.getText = function() {
- return /** @type {string} */ (!this.hasText() ? "" : jspb.Message.getField(this, 1));
- };
- /** @param {string|undefined} value */
- proto.transit_realtime.TranslatedString.Translation.prototype.setText = function(value) {
- jspb.Message.setField(this, 1, value);
- };
- proto.transit_realtime.TranslatedString.Translation.prototype.clearText = function() {
- jspb.Message.setField(this, 1, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return{!boolean}
- */
- proto.transit_realtime.TranslatedString.Translation.prototype.hasText = function() {
- return jspb.Message.getField(this, 1) != null;
- };
- /**
- * optional string language = 2;
- * @return {string}
- */
- proto.transit_realtime.TranslatedString.Translation.prototype.getLanguage = function() {
- return /** @type {string} */ (!this.hasLanguage() ? "" : jspb.Message.getField(this, 2));
- };
- /** @param {string?|undefined} value */
- proto.transit_realtime.TranslatedString.Translation.prototype.setLanguage = function(value) {
- jspb.Message.setField(this, 2, value);
- };
- proto.transit_realtime.TranslatedString.Translation.prototype.clearLanguage = function() {
- jspb.Message.setField(this, 2, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return{!boolean}
- */
- proto.transit_realtime.TranslatedString.Translation.prototype.hasLanguage = function() {
- return jspb.Message.getField(this, 2) != null;
- };
- /**
- * The extensions registered with this message class. This is a map of
- * extension field number to fieldInfo object.
- *
- * For example:
- * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
- *
- * fieldName contains the JsCompiler renamed field name property so that it
- * works in OPTIMIZED mode.
- *
- * @type {!Object.<number, jspb.ExtensionFieldInfo>}
- */
- proto.transit_realtime.TranslatedString.Translation.extensions = {};
|