blob: 1cc063c66a7bd2e48a9bb54d5d113e0b1bcbbc9f [file] [log] [blame]
Adrià Vilanova Martínez413cb442021-09-06 00:30:45 +02001// source: google/protobuf/source_context.proto
2/**
3 * @fileoverview
4 * @enhanceable
5 * @suppress {missingRequire} reports error on implicit type usages.
6 * @suppress {messageConventions} JS Compiler reports an error if a variable or
7 * field starts with 'MSG_' and isn't a translatable message.
8 * @public
9 */
10// GENERATED CODE -- DO NOT EDIT!
11/* eslint-disable */
12// @ts-nocheck
13
14var jspb = require('google-protobuf');
15var goog = jspb;
16var proto = {};
17
18goog.exportSymbol('google.protobuf.SourceContext', null, proto);
19/**
20 * Generated by JsPbCodeGenerator.
21 * @param {Array=} opt_data Optional initial data array, typically from a
22 * server response, or constructed directly in Javascript. The array is used
23 * in place and becomes part of the constructed object. It is not cloned.
24 * If no data is provided, the constructed object will be empty, but still
25 * valid.
26 * @extends {jspb.Message}
27 * @constructor
28 */
29proto.google.protobuf.SourceContext = function(opt_data) {
30 jspb.Message.initialize(this, opt_data, 0, -1, null, null);
31};
32goog.inherits(proto.google.protobuf.SourceContext, jspb.Message);
33if (goog.DEBUG && !COMPILED) {
34 /**
35 * @public
36 * @override
37 */
38 proto.google.protobuf.SourceContext.displayName = 'proto.google.protobuf.SourceContext';
39}
40
41
42
43if (jspb.Message.GENERATE_TO_OBJECT) {
44/**
45 * Creates an object representation of this proto.
46 * Field names that are reserved in JavaScript and will be renamed to pb_name.
47 * Optional fields that are not set will be set to undefined.
48 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
49 * For the list of reserved names please see:
50 * net/proto2/compiler/js/internal/generator.cc#kKeyword.
51 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
52 * JSPB instance for transitional soy proto support:
53 * http://goto/soy-param-migration
54 * @return {!Object}
55 */
56proto.google.protobuf.SourceContext.prototype.toObject = function(opt_includeInstance) {
57 return proto.google.protobuf.SourceContext.toObject(opt_includeInstance, this);
58};
59
60
61/**
62 * Static version of the {@see toObject} method.
63 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
64 * the JSPB instance for transitional soy proto support:
65 * http://goto/soy-param-migration
66 * @param {!proto.google.protobuf.SourceContext} msg The msg instance to transform.
67 * @return {!Object}
68 * @suppress {unusedLocalVariables} f is only used for nested messages
69 */
70proto.google.protobuf.SourceContext.toObject = function(includeInstance, msg) {
71 var f, obj = {
72 fileName: jspb.Message.getFieldWithDefault(msg, 1, "")
73 };
74
75 if (includeInstance) {
76 obj.$jspbMessageInstance = msg;
77 }
78 return obj;
79};
80}
81
82
83/**
84 * Deserializes binary data (in protobuf wire format).
85 * @param {jspb.ByteSource} bytes The bytes to deserialize.
86 * @return {!proto.google.protobuf.SourceContext}
87 */
88proto.google.protobuf.SourceContext.deserializeBinary = function(bytes) {
89 var reader = new jspb.BinaryReader(bytes);
90 var msg = new proto.google.protobuf.SourceContext;
91 return proto.google.protobuf.SourceContext.deserializeBinaryFromReader(msg, reader);
92};
93
94
95/**
96 * Deserializes binary data (in protobuf wire format) from the
97 * given reader into the given message object.
98 * @param {!proto.google.protobuf.SourceContext} msg The message object to deserialize into.
99 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
100 * @return {!proto.google.protobuf.SourceContext}
101 */
102proto.google.protobuf.SourceContext.deserializeBinaryFromReader = function(msg, reader) {
103 while (reader.nextField()) {
104 if (reader.isEndGroup()) {
105 break;
106 }
107 var field = reader.getFieldNumber();
108 switch (field) {
109 case 1:
110 var value = /** @type {string} */ (reader.readString());
111 msg.setFileName(value);
112 break;
113 default:
114 reader.skipField();
115 break;
116 }
117 }
118 return msg;
119};
120
121
122/**
123 * Serializes the message to binary data (in protobuf wire format).
124 * @return {!Uint8Array}
125 */
126proto.google.protobuf.SourceContext.prototype.serializeBinary = function() {
127 var writer = new jspb.BinaryWriter();
128 proto.google.protobuf.SourceContext.serializeBinaryToWriter(this, writer);
129 return writer.getResultBuffer();
130};
131
132
133/**
134 * Serializes the given message to binary data (in protobuf wire
135 * format), writing to the given BinaryWriter.
136 * @param {!proto.google.protobuf.SourceContext} message
137 * @param {!jspb.BinaryWriter} writer
138 * @suppress {unusedLocalVariables} f is only used for nested messages
139 */
140proto.google.protobuf.SourceContext.serializeBinaryToWriter = function(message, writer) {
141 var f = undefined;
142 f = message.getFileName();
143 if (f.length > 0) {
144 writer.writeString(
145 1,
146 f
147 );
148 }
149};
150
151
152/**
153 * optional string file_name = 1;
154 * @return {string}
155 */
156proto.google.protobuf.SourceContext.prototype.getFileName = function() {
157 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
158};
159
160
161/**
162 * @param {string} value
163 * @return {!proto.google.protobuf.SourceContext} returns this
164 */
165proto.google.protobuf.SourceContext.prototype.setFileName = function(value) {
166 return jspb.Message.setProto3StringField(this, 1, value);
167};
168
169
170goog.object.extend(exports, proto);