-
Notifications
You must be signed in to change notification settings - Fork 1
/
extensions_pb.js
257 lines (224 loc) · 7.14 KB
/
extensions_pb.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
// source: extensions.proto
/**
* @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!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.object.extend(proto, google_protobuf_descriptor_pb);
goog.exportSymbol('proto.QxFieldOptions', null, global);
goog.exportSymbol('proto.qx', 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.QxFieldOptions = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.QxFieldOptions, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.QxFieldOptions.displayName = 'proto.QxFieldOptions';
}
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.QxFieldOptions.prototype.toObject = function(opt_includeInstance) {
return proto.QxFieldOptions.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.QxFieldOptions} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.QxFieldOptions.toObject = function(includeInstance, msg) {
var f, obj = {
annotations: jspb.Message.getFieldWithDefault(msg, 1, ""),
type: jspb.Message.getFieldWithDefault(msg, 2, ""),
validate: 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.QxFieldOptions}
*/
proto.QxFieldOptions.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.QxFieldOptions;
return proto.QxFieldOptions.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.QxFieldOptions} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.QxFieldOptions}
*/
proto.QxFieldOptions.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.setAnnotations(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setValidate(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.QxFieldOptions.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.QxFieldOptions.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.QxFieldOptions} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.QxFieldOptions.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAnnotations();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getType();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getValidate();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string annotations = 1;
* @return {string}
*/
proto.QxFieldOptions.prototype.getAnnotations = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.QxFieldOptions} returns this
*/
proto.QxFieldOptions.prototype.setAnnotations = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string type = 2;
* @return {string}
*/
proto.QxFieldOptions.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.QxFieldOptions} returns this
*/
proto.QxFieldOptions.prototype.setType = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string validate = 3;
* @return {string}
*/
proto.QxFieldOptions.prototype.getValidate = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.QxFieldOptions} returns this
*/
proto.QxFieldOptions.prototype.setValidate = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* A tuple of {field number, class constructor} for the extension
* field named `qx`.
* @type {!jspb.ExtensionFieldInfo<!proto.QxFieldOptions>}
*/
proto.qx = new jspb.ExtensionFieldInfo(
100001,
{qx: 0},
proto.QxFieldOptions,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.QxFieldOptions.toObject),
0);
google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[100001] = new jspb.ExtensionFieldBinaryInfo(
proto.qx,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.QxFieldOptions.serializeBinaryToWriter,
proto.QxFieldOptions.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.FieldOptions.extensions[100001] = proto.qx;
goog.object.extend(exports, proto);