Skip to content

Commit 7c73791

Browse files
committed
[GEN] Updated compiled proto definitions
1 parent 415d2f6 commit 7c73791

7 files changed

Lines changed: 360 additions & 246 deletions

File tree

proto/gen/generic_pb.d.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import * as jspb from 'google-protobuf'
2+
3+
4+
5+
export class Empty extends jspb.Message {
6+
serializeBinary(): Uint8Array;
7+
toObject(includeInstance?: boolean): Empty.AsObject;
8+
static toObject(includeInstance: boolean, msg: Empty): Empty.AsObject;
9+
static serializeBinaryToWriter(message: Empty, writer: jspb.BinaryWriter): void;
10+
static deserializeBinary(bytes: Uint8Array): Empty;
11+
static deserializeBinaryFromReader(message: Empty, reader: jspb.BinaryReader): Empty;
12+
}
13+
14+
export namespace Empty {
15+
export type AsObject = {
16+
};
17+
}
18+
19+
export class Optional extends jspb.Message {
20+
getValue(): string;
21+
setValue(value: string): Optional;
22+
hasValue(): boolean;
23+
clearValue(): Optional;
24+
25+
serializeBinary(): Uint8Array;
26+
toObject(includeInstance?: boolean): Optional.AsObject;
27+
static toObject(includeInstance: boolean, msg: Optional): Optional.AsObject;
28+
static serializeBinaryToWriter(message: Optional, writer: jspb.BinaryWriter): void;
29+
static deserializeBinary(bytes: Uint8Array): Optional;
30+
static deserializeBinaryFromReader(message: Optional, reader: jspb.BinaryReader): Optional;
31+
}
32+
33+
export namespace Optional {
34+
export type AsObject = {
35+
value?: string;
36+
};
37+
38+
export const enum ValueCase {
39+
_VALUE_NOT_SET = 0,
40+
VALUE = 1,
41+
}
42+
}
43+

proto/gen/generic_pb.js

Lines changed: 317 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,317 @@
1+
// source: generic.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+
14+
var jspb = require('google-protobuf');
15+
var goog = jspb;
16+
var global =
17+
(typeof globalThis !== 'undefined' && globalThis) ||
18+
(typeof window !== 'undefined' && window) ||
19+
(typeof global !== 'undefined' && global) ||
20+
(typeof self !== 'undefined' && self) ||
21+
(function () { return this; }).call(null) ||
22+
Function('return this')();
23+
24+
goog.exportSymbol('proto.generic.Empty', null, global);
25+
goog.exportSymbol('proto.generic.Optional', null, global);
26+
/**
27+
* Generated by JsPbCodeGenerator.
28+
* @param {Array=} opt_data Optional initial data array, typically from a
29+
* server response, or constructed directly in Javascript. The array is used
30+
* in place and becomes part of the constructed object. It is not cloned.
31+
* If no data is provided, the constructed object will be empty, but still
32+
* valid.
33+
* @extends {jspb.Message}
34+
* @constructor
35+
*/
36+
proto.generic.Empty = function(opt_data) {
37+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
38+
};
39+
goog.inherits(proto.generic.Empty, jspb.Message);
40+
if (goog.DEBUG && !COMPILED) {
41+
/**
42+
* @public
43+
* @override
44+
*/
45+
proto.generic.Empty.displayName = 'proto.generic.Empty';
46+
}
47+
/**
48+
* Generated by JsPbCodeGenerator.
49+
* @param {Array=} opt_data Optional initial data array, typically from a
50+
* server response, or constructed directly in Javascript. The array is used
51+
* in place and becomes part of the constructed object. It is not cloned.
52+
* If no data is provided, the constructed object will be empty, but still
53+
* valid.
54+
* @extends {jspb.Message}
55+
* @constructor
56+
*/
57+
proto.generic.Optional = function(opt_data) {
58+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
59+
};
60+
goog.inherits(proto.generic.Optional, jspb.Message);
61+
if (goog.DEBUG && !COMPILED) {
62+
/**
63+
* @public
64+
* @override
65+
*/
66+
proto.generic.Optional.displayName = 'proto.generic.Optional';
67+
}
68+
69+
70+
71+
if (jspb.Message.GENERATE_TO_OBJECT) {
72+
/**
73+
* Creates an object representation of this proto.
74+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
75+
* Optional fields that are not set will be set to undefined.
76+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
77+
* For the list of reserved names please see:
78+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
79+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
80+
* JSPB instance for transitional soy proto support:
81+
* http://goto/soy-param-migration
82+
* @return {!Object}
83+
*/
84+
proto.generic.Empty.prototype.toObject = function(opt_includeInstance) {
85+
return proto.generic.Empty.toObject(opt_includeInstance, this);
86+
};
87+
88+
89+
/**
90+
* Static version of the {@see toObject} method.
91+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
92+
* the JSPB instance for transitional soy proto support:
93+
* http://goto/soy-param-migration
94+
* @param {!proto.generic.Empty} msg The msg instance to transform.
95+
* @return {!Object}
96+
* @suppress {unusedLocalVariables} f is only used for nested messages
97+
*/
98+
proto.generic.Empty.toObject = function(includeInstance, msg) {
99+
var f, obj = {
100+
101+
};
102+
103+
if (includeInstance) {
104+
obj.$jspbMessageInstance = msg;
105+
}
106+
return obj;
107+
};
108+
}
109+
110+
111+
/**
112+
* Deserializes binary data (in protobuf wire format).
113+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
114+
* @return {!proto.generic.Empty}
115+
*/
116+
proto.generic.Empty.deserializeBinary = function(bytes) {
117+
var reader = new jspb.BinaryReader(bytes);
118+
var msg = new proto.generic.Empty;
119+
return proto.generic.Empty.deserializeBinaryFromReader(msg, reader);
120+
};
121+
122+
123+
/**
124+
* Deserializes binary data (in protobuf wire format) from the
125+
* given reader into the given message object.
126+
* @param {!proto.generic.Empty} msg The message object to deserialize into.
127+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
128+
* @return {!proto.generic.Empty}
129+
*/
130+
proto.generic.Empty.deserializeBinaryFromReader = function(msg, reader) {
131+
while (reader.nextField()) {
132+
if (reader.isEndGroup()) {
133+
break;
134+
}
135+
var field = reader.getFieldNumber();
136+
switch (field) {
137+
default:
138+
reader.skipField();
139+
break;
140+
}
141+
}
142+
return msg;
143+
};
144+
145+
146+
/**
147+
* Serializes the message to binary data (in protobuf wire format).
148+
* @return {!Uint8Array}
149+
*/
150+
proto.generic.Empty.prototype.serializeBinary = function() {
151+
var writer = new jspb.BinaryWriter();
152+
proto.generic.Empty.serializeBinaryToWriter(this, writer);
153+
return writer.getResultBuffer();
154+
};
155+
156+
157+
/**
158+
* Serializes the given message to binary data (in protobuf wire
159+
* format), writing to the given BinaryWriter.
160+
* @param {!proto.generic.Empty} message
161+
* @param {!jspb.BinaryWriter} writer
162+
* @suppress {unusedLocalVariables} f is only used for nested messages
163+
*/
164+
proto.generic.Empty.serializeBinaryToWriter = function(message, writer) {
165+
var f = undefined;
166+
};
167+
168+
169+
170+
171+
172+
if (jspb.Message.GENERATE_TO_OBJECT) {
173+
/**
174+
* Creates an object representation of this proto.
175+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
176+
* Optional fields that are not set will be set to undefined.
177+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
178+
* For the list of reserved names please see:
179+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
180+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
181+
* JSPB instance for transitional soy proto support:
182+
* http://goto/soy-param-migration
183+
* @return {!Object}
184+
*/
185+
proto.generic.Optional.prototype.toObject = function(opt_includeInstance) {
186+
return proto.generic.Optional.toObject(opt_includeInstance, this);
187+
};
188+
189+
190+
/**
191+
* Static version of the {@see toObject} method.
192+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
193+
* the JSPB instance for transitional soy proto support:
194+
* http://goto/soy-param-migration
195+
* @param {!proto.generic.Optional} msg The msg instance to transform.
196+
* @return {!Object}
197+
* @suppress {unusedLocalVariables} f is only used for nested messages
198+
*/
199+
proto.generic.Optional.toObject = function(includeInstance, msg) {
200+
var f, obj = {
201+
value: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f
202+
};
203+
204+
if (includeInstance) {
205+
obj.$jspbMessageInstance = msg;
206+
}
207+
return obj;
208+
};
209+
}
210+
211+
212+
/**
213+
* Deserializes binary data (in protobuf wire format).
214+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
215+
* @return {!proto.generic.Optional}
216+
*/
217+
proto.generic.Optional.deserializeBinary = function(bytes) {
218+
var reader = new jspb.BinaryReader(bytes);
219+
var msg = new proto.generic.Optional;
220+
return proto.generic.Optional.deserializeBinaryFromReader(msg, reader);
221+
};
222+
223+
224+
/**
225+
* Deserializes binary data (in protobuf wire format) from the
226+
* given reader into the given message object.
227+
* @param {!proto.generic.Optional} msg The message object to deserialize into.
228+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
229+
* @return {!proto.generic.Optional}
230+
*/
231+
proto.generic.Optional.deserializeBinaryFromReader = function(msg, reader) {
232+
while (reader.nextField()) {
233+
if (reader.isEndGroup()) {
234+
break;
235+
}
236+
var field = reader.getFieldNumber();
237+
switch (field) {
238+
case 1:
239+
var value = /** @type {string} */ (reader.readString());
240+
msg.setValue(value);
241+
break;
242+
default:
243+
reader.skipField();
244+
break;
245+
}
246+
}
247+
return msg;
248+
};
249+
250+
251+
/**
252+
* Serializes the message to binary data (in protobuf wire format).
253+
* @return {!Uint8Array}
254+
*/
255+
proto.generic.Optional.prototype.serializeBinary = function() {
256+
var writer = new jspb.BinaryWriter();
257+
proto.generic.Optional.serializeBinaryToWriter(this, writer);
258+
return writer.getResultBuffer();
259+
};
260+
261+
262+
/**
263+
* Serializes the given message to binary data (in protobuf wire
264+
* format), writing to the given BinaryWriter.
265+
* @param {!proto.generic.Optional} message
266+
* @param {!jspb.BinaryWriter} writer
267+
* @suppress {unusedLocalVariables} f is only used for nested messages
268+
*/
269+
proto.generic.Optional.serializeBinaryToWriter = function(message, writer) {
270+
var f = undefined;
271+
f = /** @type {string} */ (jspb.Message.getField(message, 1));
272+
if (f != null) {
273+
writer.writeString(
274+
1,
275+
f
276+
);
277+
}
278+
};
279+
280+
281+
/**
282+
* optional string value = 1;
283+
* @return {string}
284+
*/
285+
proto.generic.Optional.prototype.getValue = function() {
286+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
287+
};
288+
289+
290+
/**
291+
* @param {string} value
292+
* @return {!proto.generic.Optional} returns this
293+
*/
294+
proto.generic.Optional.prototype.setValue = function(value) {
295+
return jspb.Message.setField(this, 1, value);
296+
};
297+
298+
299+
/**
300+
* Clears the field making it undefined.
301+
* @return {!proto.generic.Optional} returns this
302+
*/
303+
proto.generic.Optional.prototype.clearValue = function() {
304+
return jspb.Message.setField(this, 1, undefined);
305+
};
306+
307+
308+
/**
309+
* Returns whether this field is set.
310+
* @return {boolean}
311+
*/
312+
proto.generic.Optional.prototype.hasValue = function() {
313+
return jspb.Message.getField(this, 1) != null;
314+
};
315+
316+
317+
goog.object.extend(exports, proto.generic);

0 commit comments

Comments
 (0)