protobuf-platform 1.0.91 → 1.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cms/cms.proto +29 -0
- package/cms/cms_grpc_pb.js +122 -0
- package/cms/cms_pb.js +1044 -0
- package/index.js +6 -0
- package/package.json +1 -1
- package/update_protobuf.sh +2 -1
package/cms/cms.proto
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package cms;
|
4
|
+
|
5
|
+
service CMS {
|
6
|
+
rpc checkConnection(PingRequest) returns (PongResponse);
|
7
|
+
//Widgets
|
8
|
+
rpc setMainPageWidget(MainPageWidgetRequest) returns (MainPageWidgetItem);
|
9
|
+
rpc getMainPageWidget(GetMainPageWidgetRequest) returns (MainPageWidgetItem);
|
10
|
+
rpc getMainPageWidgetList(GetMainPageWidgetRequest) returns (MainPageWidgetResponse);
|
11
|
+
}
|
12
|
+
|
13
|
+
message PingRequest { string ping = 1; }
|
14
|
+
message PongResponse { string pong = 1; }
|
15
|
+
//Widgets
|
16
|
+
message MainPageWidgetRequest {
|
17
|
+
string geo = 1;
|
18
|
+
string content = 2;
|
19
|
+
}
|
20
|
+
message GetMainPageWidgetRequest {
|
21
|
+
optional string geo = 1;
|
22
|
+
}
|
23
|
+
message MainPageWidgetItem {
|
24
|
+
string geo = 1;
|
25
|
+
string content = 2;
|
26
|
+
}
|
27
|
+
message MainPageWidgetResponse {
|
28
|
+
repeated MainPageWidgetItem items = 1;
|
29
|
+
}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
// GENERATED CODE -- DO NOT EDIT!
|
2
|
+
|
3
|
+
'use strict';
|
4
|
+
var grpc = require('@grpc/grpc-js');
|
5
|
+
var cms_pb = require('./cms_pb.js');
|
6
|
+
|
7
|
+
function serialize_cms_GetMainPageWidgetRequest(arg) {
|
8
|
+
if (!(arg instanceof cms_pb.GetMainPageWidgetRequest)) {
|
9
|
+
throw new Error('Expected argument of type cms.GetMainPageWidgetRequest');
|
10
|
+
}
|
11
|
+
return Buffer.from(arg.serializeBinary());
|
12
|
+
}
|
13
|
+
|
14
|
+
function deserialize_cms_GetMainPageWidgetRequest(buffer_arg) {
|
15
|
+
return cms_pb.GetMainPageWidgetRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
16
|
+
}
|
17
|
+
|
18
|
+
function serialize_cms_MainPageWidgetItem(arg) {
|
19
|
+
if (!(arg instanceof cms_pb.MainPageWidgetItem)) {
|
20
|
+
throw new Error('Expected argument of type cms.MainPageWidgetItem');
|
21
|
+
}
|
22
|
+
return Buffer.from(arg.serializeBinary());
|
23
|
+
}
|
24
|
+
|
25
|
+
function deserialize_cms_MainPageWidgetItem(buffer_arg) {
|
26
|
+
return cms_pb.MainPageWidgetItem.deserializeBinary(new Uint8Array(buffer_arg));
|
27
|
+
}
|
28
|
+
|
29
|
+
function serialize_cms_MainPageWidgetRequest(arg) {
|
30
|
+
if (!(arg instanceof cms_pb.MainPageWidgetRequest)) {
|
31
|
+
throw new Error('Expected argument of type cms.MainPageWidgetRequest');
|
32
|
+
}
|
33
|
+
return Buffer.from(arg.serializeBinary());
|
34
|
+
}
|
35
|
+
|
36
|
+
function deserialize_cms_MainPageWidgetRequest(buffer_arg) {
|
37
|
+
return cms_pb.MainPageWidgetRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
38
|
+
}
|
39
|
+
|
40
|
+
function serialize_cms_MainPageWidgetResponse(arg) {
|
41
|
+
if (!(arg instanceof cms_pb.MainPageWidgetResponse)) {
|
42
|
+
throw new Error('Expected argument of type cms.MainPageWidgetResponse');
|
43
|
+
}
|
44
|
+
return Buffer.from(arg.serializeBinary());
|
45
|
+
}
|
46
|
+
|
47
|
+
function deserialize_cms_MainPageWidgetResponse(buffer_arg) {
|
48
|
+
return cms_pb.MainPageWidgetResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
49
|
+
}
|
50
|
+
|
51
|
+
function serialize_cms_PingRequest(arg) {
|
52
|
+
if (!(arg instanceof cms_pb.PingRequest)) {
|
53
|
+
throw new Error('Expected argument of type cms.PingRequest');
|
54
|
+
}
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
56
|
+
}
|
57
|
+
|
58
|
+
function deserialize_cms_PingRequest(buffer_arg) {
|
59
|
+
return cms_pb.PingRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
60
|
+
}
|
61
|
+
|
62
|
+
function serialize_cms_PongResponse(arg) {
|
63
|
+
if (!(arg instanceof cms_pb.PongResponse)) {
|
64
|
+
throw new Error('Expected argument of type cms.PongResponse');
|
65
|
+
}
|
66
|
+
return Buffer.from(arg.serializeBinary());
|
67
|
+
}
|
68
|
+
|
69
|
+
function deserialize_cms_PongResponse(buffer_arg) {
|
70
|
+
return cms_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
var CMSService = exports.CMSService = {
|
75
|
+
checkConnection: {
|
76
|
+
path: '/cms.CMS/checkConnection',
|
77
|
+
requestStream: false,
|
78
|
+
responseStream: false,
|
79
|
+
requestType: cms_pb.PingRequest,
|
80
|
+
responseType: cms_pb.PongResponse,
|
81
|
+
requestSerialize: serialize_cms_PingRequest,
|
82
|
+
requestDeserialize: deserialize_cms_PingRequest,
|
83
|
+
responseSerialize: serialize_cms_PongResponse,
|
84
|
+
responseDeserialize: deserialize_cms_PongResponse,
|
85
|
+
},
|
86
|
+
// Widgets
|
87
|
+
setMainPageWidget: {
|
88
|
+
path: '/cms.CMS/setMainPageWidget',
|
89
|
+
requestStream: false,
|
90
|
+
responseStream: false,
|
91
|
+
requestType: cms_pb.MainPageWidgetRequest,
|
92
|
+
responseType: cms_pb.MainPageWidgetItem,
|
93
|
+
requestSerialize: serialize_cms_MainPageWidgetRequest,
|
94
|
+
requestDeserialize: deserialize_cms_MainPageWidgetRequest,
|
95
|
+
responseSerialize: serialize_cms_MainPageWidgetItem,
|
96
|
+
responseDeserialize: deserialize_cms_MainPageWidgetItem,
|
97
|
+
},
|
98
|
+
getMainPageWidget: {
|
99
|
+
path: '/cms.CMS/getMainPageWidget',
|
100
|
+
requestStream: false,
|
101
|
+
responseStream: false,
|
102
|
+
requestType: cms_pb.GetMainPageWidgetRequest,
|
103
|
+
responseType: cms_pb.MainPageWidgetItem,
|
104
|
+
requestSerialize: serialize_cms_GetMainPageWidgetRequest,
|
105
|
+
requestDeserialize: deserialize_cms_GetMainPageWidgetRequest,
|
106
|
+
responseSerialize: serialize_cms_MainPageWidgetItem,
|
107
|
+
responseDeserialize: deserialize_cms_MainPageWidgetItem,
|
108
|
+
},
|
109
|
+
getMainPageWidgetList: {
|
110
|
+
path: '/cms.CMS/getMainPageWidgetList',
|
111
|
+
requestStream: false,
|
112
|
+
responseStream: false,
|
113
|
+
requestType: cms_pb.GetMainPageWidgetRequest,
|
114
|
+
responseType: cms_pb.MainPageWidgetResponse,
|
115
|
+
requestSerialize: serialize_cms_GetMainPageWidgetRequest,
|
116
|
+
requestDeserialize: deserialize_cms_GetMainPageWidgetRequest,
|
117
|
+
responseSerialize: serialize_cms_MainPageWidgetResponse,
|
118
|
+
responseDeserialize: deserialize_cms_MainPageWidgetResponse,
|
119
|
+
},
|
120
|
+
};
|
121
|
+
|
122
|
+
exports.CMSClient = grpc.makeGenericClientConstructor(CMSService);
|
package/cms/cms_pb.js
ADDED
@@ -0,0 +1,1044 @@
|
|
1
|
+
// source: cms.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 = (function() {
|
17
|
+
if (this) { return this; }
|
18
|
+
if (typeof window !== 'undefined') { return window; }
|
19
|
+
if (typeof global !== 'undefined') { return global; }
|
20
|
+
if (typeof self !== 'undefined') { return self; }
|
21
|
+
return Function('return this')();
|
22
|
+
}.call(null));
|
23
|
+
|
24
|
+
goog.exportSymbol('proto.cms.GetMainPageWidgetRequest', null, global);
|
25
|
+
goog.exportSymbol('proto.cms.MainPageWidgetItem', null, global);
|
26
|
+
goog.exportSymbol('proto.cms.MainPageWidgetRequest', null, global);
|
27
|
+
goog.exportSymbol('proto.cms.MainPageWidgetResponse', null, global);
|
28
|
+
goog.exportSymbol('proto.cms.PingRequest', null, global);
|
29
|
+
goog.exportSymbol('proto.cms.PongResponse', null, global);
|
30
|
+
/**
|
31
|
+
* Generated by JsPbCodeGenerator.
|
32
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
33
|
+
* server response, or constructed directly in Javascript. The array is used
|
34
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
35
|
+
* If no data is provided, the constructed object will be empty, but still
|
36
|
+
* valid.
|
37
|
+
* @extends {jspb.Message}
|
38
|
+
* @constructor
|
39
|
+
*/
|
40
|
+
proto.cms.PingRequest = function(opt_data) {
|
41
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
42
|
+
};
|
43
|
+
goog.inherits(proto.cms.PingRequest, jspb.Message);
|
44
|
+
if (goog.DEBUG && !COMPILED) {
|
45
|
+
/**
|
46
|
+
* @public
|
47
|
+
* @override
|
48
|
+
*/
|
49
|
+
proto.cms.PingRequest.displayName = 'proto.cms.PingRequest';
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Generated by JsPbCodeGenerator.
|
53
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
54
|
+
* server response, or constructed directly in Javascript. The array is used
|
55
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
56
|
+
* If no data is provided, the constructed object will be empty, but still
|
57
|
+
* valid.
|
58
|
+
* @extends {jspb.Message}
|
59
|
+
* @constructor
|
60
|
+
*/
|
61
|
+
proto.cms.PongResponse = function(opt_data) {
|
62
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
63
|
+
};
|
64
|
+
goog.inherits(proto.cms.PongResponse, jspb.Message);
|
65
|
+
if (goog.DEBUG && !COMPILED) {
|
66
|
+
/**
|
67
|
+
* @public
|
68
|
+
* @override
|
69
|
+
*/
|
70
|
+
proto.cms.PongResponse.displayName = 'proto.cms.PongResponse';
|
71
|
+
}
|
72
|
+
/**
|
73
|
+
* Generated by JsPbCodeGenerator.
|
74
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
75
|
+
* server response, or constructed directly in Javascript. The array is used
|
76
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
77
|
+
* If no data is provided, the constructed object will be empty, but still
|
78
|
+
* valid.
|
79
|
+
* @extends {jspb.Message}
|
80
|
+
* @constructor
|
81
|
+
*/
|
82
|
+
proto.cms.MainPageWidgetRequest = function(opt_data) {
|
83
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
84
|
+
};
|
85
|
+
goog.inherits(proto.cms.MainPageWidgetRequest, jspb.Message);
|
86
|
+
if (goog.DEBUG && !COMPILED) {
|
87
|
+
/**
|
88
|
+
* @public
|
89
|
+
* @override
|
90
|
+
*/
|
91
|
+
proto.cms.MainPageWidgetRequest.displayName = 'proto.cms.MainPageWidgetRequest';
|
92
|
+
}
|
93
|
+
/**
|
94
|
+
* Generated by JsPbCodeGenerator.
|
95
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
96
|
+
* server response, or constructed directly in Javascript. The array is used
|
97
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
98
|
+
* If no data is provided, the constructed object will be empty, but still
|
99
|
+
* valid.
|
100
|
+
* @extends {jspb.Message}
|
101
|
+
* @constructor
|
102
|
+
*/
|
103
|
+
proto.cms.GetMainPageWidgetRequest = function(opt_data) {
|
104
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
105
|
+
};
|
106
|
+
goog.inherits(proto.cms.GetMainPageWidgetRequest, jspb.Message);
|
107
|
+
if (goog.DEBUG && !COMPILED) {
|
108
|
+
/**
|
109
|
+
* @public
|
110
|
+
* @override
|
111
|
+
*/
|
112
|
+
proto.cms.GetMainPageWidgetRequest.displayName = 'proto.cms.GetMainPageWidgetRequest';
|
113
|
+
}
|
114
|
+
/**
|
115
|
+
* Generated by JsPbCodeGenerator.
|
116
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
117
|
+
* server response, or constructed directly in Javascript. The array is used
|
118
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
119
|
+
* If no data is provided, the constructed object will be empty, but still
|
120
|
+
* valid.
|
121
|
+
* @extends {jspb.Message}
|
122
|
+
* @constructor
|
123
|
+
*/
|
124
|
+
proto.cms.MainPageWidgetItem = function(opt_data) {
|
125
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
126
|
+
};
|
127
|
+
goog.inherits(proto.cms.MainPageWidgetItem, jspb.Message);
|
128
|
+
if (goog.DEBUG && !COMPILED) {
|
129
|
+
/**
|
130
|
+
* @public
|
131
|
+
* @override
|
132
|
+
*/
|
133
|
+
proto.cms.MainPageWidgetItem.displayName = 'proto.cms.MainPageWidgetItem';
|
134
|
+
}
|
135
|
+
/**
|
136
|
+
* Generated by JsPbCodeGenerator.
|
137
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
138
|
+
* server response, or constructed directly in Javascript. The array is used
|
139
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
140
|
+
* If no data is provided, the constructed object will be empty, but still
|
141
|
+
* valid.
|
142
|
+
* @extends {jspb.Message}
|
143
|
+
* @constructor
|
144
|
+
*/
|
145
|
+
proto.cms.MainPageWidgetResponse = function(opt_data) {
|
146
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.cms.MainPageWidgetResponse.repeatedFields_, null);
|
147
|
+
};
|
148
|
+
goog.inherits(proto.cms.MainPageWidgetResponse, jspb.Message);
|
149
|
+
if (goog.DEBUG && !COMPILED) {
|
150
|
+
/**
|
151
|
+
* @public
|
152
|
+
* @override
|
153
|
+
*/
|
154
|
+
proto.cms.MainPageWidgetResponse.displayName = 'proto.cms.MainPageWidgetResponse';
|
155
|
+
}
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
160
|
+
/**
|
161
|
+
* Creates an object representation of this proto.
|
162
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
163
|
+
* Optional fields that are not set will be set to undefined.
|
164
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
165
|
+
* For the list of reserved names please see:
|
166
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
167
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
168
|
+
* JSPB instance for transitional soy proto support:
|
169
|
+
* http://goto/soy-param-migration
|
170
|
+
* @return {!Object}
|
171
|
+
*/
|
172
|
+
proto.cms.PingRequest.prototype.toObject = function(opt_includeInstance) {
|
173
|
+
return proto.cms.PingRequest.toObject(opt_includeInstance, this);
|
174
|
+
};
|
175
|
+
|
176
|
+
|
177
|
+
/**
|
178
|
+
* Static version of the {@see toObject} method.
|
179
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
180
|
+
* the JSPB instance for transitional soy proto support:
|
181
|
+
* http://goto/soy-param-migration
|
182
|
+
* @param {!proto.cms.PingRequest} msg The msg instance to transform.
|
183
|
+
* @return {!Object}
|
184
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
185
|
+
*/
|
186
|
+
proto.cms.PingRequest.toObject = function(includeInstance, msg) {
|
187
|
+
var f, obj = {
|
188
|
+
ping: jspb.Message.getFieldWithDefault(msg, 1, "")
|
189
|
+
};
|
190
|
+
|
191
|
+
if (includeInstance) {
|
192
|
+
obj.$jspbMessageInstance = msg;
|
193
|
+
}
|
194
|
+
return obj;
|
195
|
+
};
|
196
|
+
}
|
197
|
+
|
198
|
+
|
199
|
+
/**
|
200
|
+
* Deserializes binary data (in protobuf wire format).
|
201
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
202
|
+
* @return {!proto.cms.PingRequest}
|
203
|
+
*/
|
204
|
+
proto.cms.PingRequest.deserializeBinary = function(bytes) {
|
205
|
+
var reader = new jspb.BinaryReader(bytes);
|
206
|
+
var msg = new proto.cms.PingRequest;
|
207
|
+
return proto.cms.PingRequest.deserializeBinaryFromReader(msg, reader);
|
208
|
+
};
|
209
|
+
|
210
|
+
|
211
|
+
/**
|
212
|
+
* Deserializes binary data (in protobuf wire format) from the
|
213
|
+
* given reader into the given message object.
|
214
|
+
* @param {!proto.cms.PingRequest} msg The message object to deserialize into.
|
215
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
216
|
+
* @return {!proto.cms.PingRequest}
|
217
|
+
*/
|
218
|
+
proto.cms.PingRequest.deserializeBinaryFromReader = function(msg, reader) {
|
219
|
+
while (reader.nextField()) {
|
220
|
+
if (reader.isEndGroup()) {
|
221
|
+
break;
|
222
|
+
}
|
223
|
+
var field = reader.getFieldNumber();
|
224
|
+
switch (field) {
|
225
|
+
case 1:
|
226
|
+
var value = /** @type {string} */ (reader.readString());
|
227
|
+
msg.setPing(value);
|
228
|
+
break;
|
229
|
+
default:
|
230
|
+
reader.skipField();
|
231
|
+
break;
|
232
|
+
}
|
233
|
+
}
|
234
|
+
return msg;
|
235
|
+
};
|
236
|
+
|
237
|
+
|
238
|
+
/**
|
239
|
+
* Serializes the message to binary data (in protobuf wire format).
|
240
|
+
* @return {!Uint8Array}
|
241
|
+
*/
|
242
|
+
proto.cms.PingRequest.prototype.serializeBinary = function() {
|
243
|
+
var writer = new jspb.BinaryWriter();
|
244
|
+
proto.cms.PingRequest.serializeBinaryToWriter(this, writer);
|
245
|
+
return writer.getResultBuffer();
|
246
|
+
};
|
247
|
+
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Serializes the given message to binary data (in protobuf wire
|
251
|
+
* format), writing to the given BinaryWriter.
|
252
|
+
* @param {!proto.cms.PingRequest} message
|
253
|
+
* @param {!jspb.BinaryWriter} writer
|
254
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
255
|
+
*/
|
256
|
+
proto.cms.PingRequest.serializeBinaryToWriter = function(message, writer) {
|
257
|
+
var f = undefined;
|
258
|
+
f = message.getPing();
|
259
|
+
if (f.length > 0) {
|
260
|
+
writer.writeString(
|
261
|
+
1,
|
262
|
+
f
|
263
|
+
);
|
264
|
+
}
|
265
|
+
};
|
266
|
+
|
267
|
+
|
268
|
+
/**
|
269
|
+
* optional string ping = 1;
|
270
|
+
* @return {string}
|
271
|
+
*/
|
272
|
+
proto.cms.PingRequest.prototype.getPing = function() {
|
273
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
274
|
+
};
|
275
|
+
|
276
|
+
|
277
|
+
/**
|
278
|
+
* @param {string} value
|
279
|
+
* @return {!proto.cms.PingRequest} returns this
|
280
|
+
*/
|
281
|
+
proto.cms.PingRequest.prototype.setPing = function(value) {
|
282
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
283
|
+
};
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
290
|
+
/**
|
291
|
+
* Creates an object representation of this proto.
|
292
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
293
|
+
* Optional fields that are not set will be set to undefined.
|
294
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
295
|
+
* For the list of reserved names please see:
|
296
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
297
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
298
|
+
* JSPB instance for transitional soy proto support:
|
299
|
+
* http://goto/soy-param-migration
|
300
|
+
* @return {!Object}
|
301
|
+
*/
|
302
|
+
proto.cms.PongResponse.prototype.toObject = function(opt_includeInstance) {
|
303
|
+
return proto.cms.PongResponse.toObject(opt_includeInstance, this);
|
304
|
+
};
|
305
|
+
|
306
|
+
|
307
|
+
/**
|
308
|
+
* Static version of the {@see toObject} method.
|
309
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
310
|
+
* the JSPB instance for transitional soy proto support:
|
311
|
+
* http://goto/soy-param-migration
|
312
|
+
* @param {!proto.cms.PongResponse} msg The msg instance to transform.
|
313
|
+
* @return {!Object}
|
314
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
315
|
+
*/
|
316
|
+
proto.cms.PongResponse.toObject = function(includeInstance, msg) {
|
317
|
+
var f, obj = {
|
318
|
+
pong: jspb.Message.getFieldWithDefault(msg, 1, "")
|
319
|
+
};
|
320
|
+
|
321
|
+
if (includeInstance) {
|
322
|
+
obj.$jspbMessageInstance = msg;
|
323
|
+
}
|
324
|
+
return obj;
|
325
|
+
};
|
326
|
+
}
|
327
|
+
|
328
|
+
|
329
|
+
/**
|
330
|
+
* Deserializes binary data (in protobuf wire format).
|
331
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
332
|
+
* @return {!proto.cms.PongResponse}
|
333
|
+
*/
|
334
|
+
proto.cms.PongResponse.deserializeBinary = function(bytes) {
|
335
|
+
var reader = new jspb.BinaryReader(bytes);
|
336
|
+
var msg = new proto.cms.PongResponse;
|
337
|
+
return proto.cms.PongResponse.deserializeBinaryFromReader(msg, reader);
|
338
|
+
};
|
339
|
+
|
340
|
+
|
341
|
+
/**
|
342
|
+
* Deserializes binary data (in protobuf wire format) from the
|
343
|
+
* given reader into the given message object.
|
344
|
+
* @param {!proto.cms.PongResponse} msg The message object to deserialize into.
|
345
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
346
|
+
* @return {!proto.cms.PongResponse}
|
347
|
+
*/
|
348
|
+
proto.cms.PongResponse.deserializeBinaryFromReader = function(msg, reader) {
|
349
|
+
while (reader.nextField()) {
|
350
|
+
if (reader.isEndGroup()) {
|
351
|
+
break;
|
352
|
+
}
|
353
|
+
var field = reader.getFieldNumber();
|
354
|
+
switch (field) {
|
355
|
+
case 1:
|
356
|
+
var value = /** @type {string} */ (reader.readString());
|
357
|
+
msg.setPong(value);
|
358
|
+
break;
|
359
|
+
default:
|
360
|
+
reader.skipField();
|
361
|
+
break;
|
362
|
+
}
|
363
|
+
}
|
364
|
+
return msg;
|
365
|
+
};
|
366
|
+
|
367
|
+
|
368
|
+
/**
|
369
|
+
* Serializes the message to binary data (in protobuf wire format).
|
370
|
+
* @return {!Uint8Array}
|
371
|
+
*/
|
372
|
+
proto.cms.PongResponse.prototype.serializeBinary = function() {
|
373
|
+
var writer = new jspb.BinaryWriter();
|
374
|
+
proto.cms.PongResponse.serializeBinaryToWriter(this, writer);
|
375
|
+
return writer.getResultBuffer();
|
376
|
+
};
|
377
|
+
|
378
|
+
|
379
|
+
/**
|
380
|
+
* Serializes the given message to binary data (in protobuf wire
|
381
|
+
* format), writing to the given BinaryWriter.
|
382
|
+
* @param {!proto.cms.PongResponse} message
|
383
|
+
* @param {!jspb.BinaryWriter} writer
|
384
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
385
|
+
*/
|
386
|
+
proto.cms.PongResponse.serializeBinaryToWriter = function(message, writer) {
|
387
|
+
var f = undefined;
|
388
|
+
f = message.getPong();
|
389
|
+
if (f.length > 0) {
|
390
|
+
writer.writeString(
|
391
|
+
1,
|
392
|
+
f
|
393
|
+
);
|
394
|
+
}
|
395
|
+
};
|
396
|
+
|
397
|
+
|
398
|
+
/**
|
399
|
+
* optional string pong = 1;
|
400
|
+
* @return {string}
|
401
|
+
*/
|
402
|
+
proto.cms.PongResponse.prototype.getPong = function() {
|
403
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
404
|
+
};
|
405
|
+
|
406
|
+
|
407
|
+
/**
|
408
|
+
* @param {string} value
|
409
|
+
* @return {!proto.cms.PongResponse} returns this
|
410
|
+
*/
|
411
|
+
proto.cms.PongResponse.prototype.setPong = function(value) {
|
412
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
413
|
+
};
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
420
|
+
/**
|
421
|
+
* Creates an object representation of this proto.
|
422
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
423
|
+
* Optional fields that are not set will be set to undefined.
|
424
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
425
|
+
* For the list of reserved names please see:
|
426
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
427
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
428
|
+
* JSPB instance for transitional soy proto support:
|
429
|
+
* http://goto/soy-param-migration
|
430
|
+
* @return {!Object}
|
431
|
+
*/
|
432
|
+
proto.cms.MainPageWidgetRequest.prototype.toObject = function(opt_includeInstance) {
|
433
|
+
return proto.cms.MainPageWidgetRequest.toObject(opt_includeInstance, this);
|
434
|
+
};
|
435
|
+
|
436
|
+
|
437
|
+
/**
|
438
|
+
* Static version of the {@see toObject} method.
|
439
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
440
|
+
* the JSPB instance for transitional soy proto support:
|
441
|
+
* http://goto/soy-param-migration
|
442
|
+
* @param {!proto.cms.MainPageWidgetRequest} msg The msg instance to transform.
|
443
|
+
* @return {!Object}
|
444
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
445
|
+
*/
|
446
|
+
proto.cms.MainPageWidgetRequest.toObject = function(includeInstance, msg) {
|
447
|
+
var f, obj = {
|
448
|
+
geo: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
449
|
+
content: jspb.Message.getFieldWithDefault(msg, 2, "")
|
450
|
+
};
|
451
|
+
|
452
|
+
if (includeInstance) {
|
453
|
+
obj.$jspbMessageInstance = msg;
|
454
|
+
}
|
455
|
+
return obj;
|
456
|
+
};
|
457
|
+
}
|
458
|
+
|
459
|
+
|
460
|
+
/**
|
461
|
+
* Deserializes binary data (in protobuf wire format).
|
462
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
463
|
+
* @return {!proto.cms.MainPageWidgetRequest}
|
464
|
+
*/
|
465
|
+
proto.cms.MainPageWidgetRequest.deserializeBinary = function(bytes) {
|
466
|
+
var reader = new jspb.BinaryReader(bytes);
|
467
|
+
var msg = new proto.cms.MainPageWidgetRequest;
|
468
|
+
return proto.cms.MainPageWidgetRequest.deserializeBinaryFromReader(msg, reader);
|
469
|
+
};
|
470
|
+
|
471
|
+
|
472
|
+
/**
|
473
|
+
* Deserializes binary data (in protobuf wire format) from the
|
474
|
+
* given reader into the given message object.
|
475
|
+
* @param {!proto.cms.MainPageWidgetRequest} msg The message object to deserialize into.
|
476
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
477
|
+
* @return {!proto.cms.MainPageWidgetRequest}
|
478
|
+
*/
|
479
|
+
proto.cms.MainPageWidgetRequest.deserializeBinaryFromReader = function(msg, reader) {
|
480
|
+
while (reader.nextField()) {
|
481
|
+
if (reader.isEndGroup()) {
|
482
|
+
break;
|
483
|
+
}
|
484
|
+
var field = reader.getFieldNumber();
|
485
|
+
switch (field) {
|
486
|
+
case 1:
|
487
|
+
var value = /** @type {string} */ (reader.readString());
|
488
|
+
msg.setGeo(value);
|
489
|
+
break;
|
490
|
+
case 2:
|
491
|
+
var value = /** @type {string} */ (reader.readString());
|
492
|
+
msg.setContent(value);
|
493
|
+
break;
|
494
|
+
default:
|
495
|
+
reader.skipField();
|
496
|
+
break;
|
497
|
+
}
|
498
|
+
}
|
499
|
+
return msg;
|
500
|
+
};
|
501
|
+
|
502
|
+
|
503
|
+
/**
|
504
|
+
* Serializes the message to binary data (in protobuf wire format).
|
505
|
+
* @return {!Uint8Array}
|
506
|
+
*/
|
507
|
+
proto.cms.MainPageWidgetRequest.prototype.serializeBinary = function() {
|
508
|
+
var writer = new jspb.BinaryWriter();
|
509
|
+
proto.cms.MainPageWidgetRequest.serializeBinaryToWriter(this, writer);
|
510
|
+
return writer.getResultBuffer();
|
511
|
+
};
|
512
|
+
|
513
|
+
|
514
|
+
/**
|
515
|
+
* Serializes the given message to binary data (in protobuf wire
|
516
|
+
* format), writing to the given BinaryWriter.
|
517
|
+
* @param {!proto.cms.MainPageWidgetRequest} message
|
518
|
+
* @param {!jspb.BinaryWriter} writer
|
519
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
520
|
+
*/
|
521
|
+
proto.cms.MainPageWidgetRequest.serializeBinaryToWriter = function(message, writer) {
|
522
|
+
var f = undefined;
|
523
|
+
f = message.getGeo();
|
524
|
+
if (f.length > 0) {
|
525
|
+
writer.writeString(
|
526
|
+
1,
|
527
|
+
f
|
528
|
+
);
|
529
|
+
}
|
530
|
+
f = message.getContent();
|
531
|
+
if (f.length > 0) {
|
532
|
+
writer.writeString(
|
533
|
+
2,
|
534
|
+
f
|
535
|
+
);
|
536
|
+
}
|
537
|
+
};
|
538
|
+
|
539
|
+
|
540
|
+
/**
|
541
|
+
* optional string geo = 1;
|
542
|
+
* @return {string}
|
543
|
+
*/
|
544
|
+
proto.cms.MainPageWidgetRequest.prototype.getGeo = function() {
|
545
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
546
|
+
};
|
547
|
+
|
548
|
+
|
549
|
+
/**
|
550
|
+
* @param {string} value
|
551
|
+
* @return {!proto.cms.MainPageWidgetRequest} returns this
|
552
|
+
*/
|
553
|
+
proto.cms.MainPageWidgetRequest.prototype.setGeo = function(value) {
|
554
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
555
|
+
};
|
556
|
+
|
557
|
+
|
558
|
+
/**
|
559
|
+
* optional string content = 2;
|
560
|
+
* @return {string}
|
561
|
+
*/
|
562
|
+
proto.cms.MainPageWidgetRequest.prototype.getContent = function() {
|
563
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
564
|
+
};
|
565
|
+
|
566
|
+
|
567
|
+
/**
|
568
|
+
* @param {string} value
|
569
|
+
* @return {!proto.cms.MainPageWidgetRequest} returns this
|
570
|
+
*/
|
571
|
+
proto.cms.MainPageWidgetRequest.prototype.setContent = function(value) {
|
572
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
573
|
+
};
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
580
|
+
/**
|
581
|
+
* Creates an object representation of this proto.
|
582
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
583
|
+
* Optional fields that are not set will be set to undefined.
|
584
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
585
|
+
* For the list of reserved names please see:
|
586
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
587
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
588
|
+
* JSPB instance for transitional soy proto support:
|
589
|
+
* http://goto/soy-param-migration
|
590
|
+
* @return {!Object}
|
591
|
+
*/
|
592
|
+
proto.cms.GetMainPageWidgetRequest.prototype.toObject = function(opt_includeInstance) {
|
593
|
+
return proto.cms.GetMainPageWidgetRequest.toObject(opt_includeInstance, this);
|
594
|
+
};
|
595
|
+
|
596
|
+
|
597
|
+
/**
|
598
|
+
* Static version of the {@see toObject} method.
|
599
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
600
|
+
* the JSPB instance for transitional soy proto support:
|
601
|
+
* http://goto/soy-param-migration
|
602
|
+
* @param {!proto.cms.GetMainPageWidgetRequest} msg The msg instance to transform.
|
603
|
+
* @return {!Object}
|
604
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
605
|
+
*/
|
606
|
+
proto.cms.GetMainPageWidgetRequest.toObject = function(includeInstance, msg) {
|
607
|
+
var f, obj = {
|
608
|
+
geo: jspb.Message.getFieldWithDefault(msg, 1, "")
|
609
|
+
};
|
610
|
+
|
611
|
+
if (includeInstance) {
|
612
|
+
obj.$jspbMessageInstance = msg;
|
613
|
+
}
|
614
|
+
return obj;
|
615
|
+
};
|
616
|
+
}
|
617
|
+
|
618
|
+
|
619
|
+
/**
|
620
|
+
* Deserializes binary data (in protobuf wire format).
|
621
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
622
|
+
* @return {!proto.cms.GetMainPageWidgetRequest}
|
623
|
+
*/
|
624
|
+
proto.cms.GetMainPageWidgetRequest.deserializeBinary = function(bytes) {
|
625
|
+
var reader = new jspb.BinaryReader(bytes);
|
626
|
+
var msg = new proto.cms.GetMainPageWidgetRequest;
|
627
|
+
return proto.cms.GetMainPageWidgetRequest.deserializeBinaryFromReader(msg, reader);
|
628
|
+
};
|
629
|
+
|
630
|
+
|
631
|
+
/**
|
632
|
+
* Deserializes binary data (in protobuf wire format) from the
|
633
|
+
* given reader into the given message object.
|
634
|
+
* @param {!proto.cms.GetMainPageWidgetRequest} msg The message object to deserialize into.
|
635
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
636
|
+
* @return {!proto.cms.GetMainPageWidgetRequest}
|
637
|
+
*/
|
638
|
+
proto.cms.GetMainPageWidgetRequest.deserializeBinaryFromReader = function(msg, reader) {
|
639
|
+
while (reader.nextField()) {
|
640
|
+
if (reader.isEndGroup()) {
|
641
|
+
break;
|
642
|
+
}
|
643
|
+
var field = reader.getFieldNumber();
|
644
|
+
switch (field) {
|
645
|
+
case 1:
|
646
|
+
var value = /** @type {string} */ (reader.readString());
|
647
|
+
msg.setGeo(value);
|
648
|
+
break;
|
649
|
+
default:
|
650
|
+
reader.skipField();
|
651
|
+
break;
|
652
|
+
}
|
653
|
+
}
|
654
|
+
return msg;
|
655
|
+
};
|
656
|
+
|
657
|
+
|
658
|
+
/**
|
659
|
+
* Serializes the message to binary data (in protobuf wire format).
|
660
|
+
* @return {!Uint8Array}
|
661
|
+
*/
|
662
|
+
proto.cms.GetMainPageWidgetRequest.prototype.serializeBinary = function() {
|
663
|
+
var writer = new jspb.BinaryWriter();
|
664
|
+
proto.cms.GetMainPageWidgetRequest.serializeBinaryToWriter(this, writer);
|
665
|
+
return writer.getResultBuffer();
|
666
|
+
};
|
667
|
+
|
668
|
+
|
669
|
+
/**
|
670
|
+
* Serializes the given message to binary data (in protobuf wire
|
671
|
+
* format), writing to the given BinaryWriter.
|
672
|
+
* @param {!proto.cms.GetMainPageWidgetRequest} message
|
673
|
+
* @param {!jspb.BinaryWriter} writer
|
674
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
675
|
+
*/
|
676
|
+
proto.cms.GetMainPageWidgetRequest.serializeBinaryToWriter = function(message, writer) {
|
677
|
+
var f = undefined;
|
678
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 1));
|
679
|
+
if (f != null) {
|
680
|
+
writer.writeString(
|
681
|
+
1,
|
682
|
+
f
|
683
|
+
);
|
684
|
+
}
|
685
|
+
};
|
686
|
+
|
687
|
+
|
688
|
+
/**
|
689
|
+
* optional string geo = 1;
|
690
|
+
* @return {string}
|
691
|
+
*/
|
692
|
+
proto.cms.GetMainPageWidgetRequest.prototype.getGeo = function() {
|
693
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
694
|
+
};
|
695
|
+
|
696
|
+
|
697
|
+
/**
|
698
|
+
* @param {string} value
|
699
|
+
* @return {!proto.cms.GetMainPageWidgetRequest} returns this
|
700
|
+
*/
|
701
|
+
proto.cms.GetMainPageWidgetRequest.prototype.setGeo = function(value) {
|
702
|
+
return jspb.Message.setField(this, 1, value);
|
703
|
+
};
|
704
|
+
|
705
|
+
|
706
|
+
/**
|
707
|
+
* Clears the field making it undefined.
|
708
|
+
* @return {!proto.cms.GetMainPageWidgetRequest} returns this
|
709
|
+
*/
|
710
|
+
proto.cms.GetMainPageWidgetRequest.prototype.clearGeo = function() {
|
711
|
+
return jspb.Message.setField(this, 1, undefined);
|
712
|
+
};
|
713
|
+
|
714
|
+
|
715
|
+
/**
|
716
|
+
* Returns whether this field is set.
|
717
|
+
* @return {boolean}
|
718
|
+
*/
|
719
|
+
proto.cms.GetMainPageWidgetRequest.prototype.hasGeo = function() {
|
720
|
+
return jspb.Message.getField(this, 1) != null;
|
721
|
+
};
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
728
|
+
/**
|
729
|
+
* Creates an object representation of this proto.
|
730
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
731
|
+
* Optional fields that are not set will be set to undefined.
|
732
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
733
|
+
* For the list of reserved names please see:
|
734
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
735
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
736
|
+
* JSPB instance for transitional soy proto support:
|
737
|
+
* http://goto/soy-param-migration
|
738
|
+
* @return {!Object}
|
739
|
+
*/
|
740
|
+
proto.cms.MainPageWidgetItem.prototype.toObject = function(opt_includeInstance) {
|
741
|
+
return proto.cms.MainPageWidgetItem.toObject(opt_includeInstance, this);
|
742
|
+
};
|
743
|
+
|
744
|
+
|
745
|
+
/**
|
746
|
+
* Static version of the {@see toObject} method.
|
747
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
748
|
+
* the JSPB instance for transitional soy proto support:
|
749
|
+
* http://goto/soy-param-migration
|
750
|
+
* @param {!proto.cms.MainPageWidgetItem} msg The msg instance to transform.
|
751
|
+
* @return {!Object}
|
752
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
753
|
+
*/
|
754
|
+
proto.cms.MainPageWidgetItem.toObject = function(includeInstance, msg) {
|
755
|
+
var f, obj = {
|
756
|
+
geo: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
757
|
+
content: jspb.Message.getFieldWithDefault(msg, 2, "")
|
758
|
+
};
|
759
|
+
|
760
|
+
if (includeInstance) {
|
761
|
+
obj.$jspbMessageInstance = msg;
|
762
|
+
}
|
763
|
+
return obj;
|
764
|
+
};
|
765
|
+
}
|
766
|
+
|
767
|
+
|
768
|
+
/**
|
769
|
+
* Deserializes binary data (in protobuf wire format).
|
770
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
771
|
+
* @return {!proto.cms.MainPageWidgetItem}
|
772
|
+
*/
|
773
|
+
proto.cms.MainPageWidgetItem.deserializeBinary = function(bytes) {
|
774
|
+
var reader = new jspb.BinaryReader(bytes);
|
775
|
+
var msg = new proto.cms.MainPageWidgetItem;
|
776
|
+
return proto.cms.MainPageWidgetItem.deserializeBinaryFromReader(msg, reader);
|
777
|
+
};
|
778
|
+
|
779
|
+
|
780
|
+
/**
|
781
|
+
* Deserializes binary data (in protobuf wire format) from the
|
782
|
+
* given reader into the given message object.
|
783
|
+
* @param {!proto.cms.MainPageWidgetItem} msg The message object to deserialize into.
|
784
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
785
|
+
* @return {!proto.cms.MainPageWidgetItem}
|
786
|
+
*/
|
787
|
+
proto.cms.MainPageWidgetItem.deserializeBinaryFromReader = function(msg, reader) {
|
788
|
+
while (reader.nextField()) {
|
789
|
+
if (reader.isEndGroup()) {
|
790
|
+
break;
|
791
|
+
}
|
792
|
+
var field = reader.getFieldNumber();
|
793
|
+
switch (field) {
|
794
|
+
case 1:
|
795
|
+
var value = /** @type {string} */ (reader.readString());
|
796
|
+
msg.setGeo(value);
|
797
|
+
break;
|
798
|
+
case 2:
|
799
|
+
var value = /** @type {string} */ (reader.readString());
|
800
|
+
msg.setContent(value);
|
801
|
+
break;
|
802
|
+
default:
|
803
|
+
reader.skipField();
|
804
|
+
break;
|
805
|
+
}
|
806
|
+
}
|
807
|
+
return msg;
|
808
|
+
};
|
809
|
+
|
810
|
+
|
811
|
+
/**
|
812
|
+
* Serializes the message to binary data (in protobuf wire format).
|
813
|
+
* @return {!Uint8Array}
|
814
|
+
*/
|
815
|
+
proto.cms.MainPageWidgetItem.prototype.serializeBinary = function() {
|
816
|
+
var writer = new jspb.BinaryWriter();
|
817
|
+
proto.cms.MainPageWidgetItem.serializeBinaryToWriter(this, writer);
|
818
|
+
return writer.getResultBuffer();
|
819
|
+
};
|
820
|
+
|
821
|
+
|
822
|
+
/**
|
823
|
+
* Serializes the given message to binary data (in protobuf wire
|
824
|
+
* format), writing to the given BinaryWriter.
|
825
|
+
* @param {!proto.cms.MainPageWidgetItem} message
|
826
|
+
* @param {!jspb.BinaryWriter} writer
|
827
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
828
|
+
*/
|
829
|
+
proto.cms.MainPageWidgetItem.serializeBinaryToWriter = function(message, writer) {
|
830
|
+
var f = undefined;
|
831
|
+
f = message.getGeo();
|
832
|
+
if (f.length > 0) {
|
833
|
+
writer.writeString(
|
834
|
+
1,
|
835
|
+
f
|
836
|
+
);
|
837
|
+
}
|
838
|
+
f = message.getContent();
|
839
|
+
if (f.length > 0) {
|
840
|
+
writer.writeString(
|
841
|
+
2,
|
842
|
+
f
|
843
|
+
);
|
844
|
+
}
|
845
|
+
};
|
846
|
+
|
847
|
+
|
848
|
+
/**
|
849
|
+
* optional string geo = 1;
|
850
|
+
* @return {string}
|
851
|
+
*/
|
852
|
+
proto.cms.MainPageWidgetItem.prototype.getGeo = function() {
|
853
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
854
|
+
};
|
855
|
+
|
856
|
+
|
857
|
+
/**
|
858
|
+
* @param {string} value
|
859
|
+
* @return {!proto.cms.MainPageWidgetItem} returns this
|
860
|
+
*/
|
861
|
+
proto.cms.MainPageWidgetItem.prototype.setGeo = function(value) {
|
862
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
863
|
+
};
|
864
|
+
|
865
|
+
|
866
|
+
/**
|
867
|
+
* optional string content = 2;
|
868
|
+
* @return {string}
|
869
|
+
*/
|
870
|
+
proto.cms.MainPageWidgetItem.prototype.getContent = function() {
|
871
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
872
|
+
};
|
873
|
+
|
874
|
+
|
875
|
+
/**
|
876
|
+
* @param {string} value
|
877
|
+
* @return {!proto.cms.MainPageWidgetItem} returns this
|
878
|
+
*/
|
879
|
+
proto.cms.MainPageWidgetItem.prototype.setContent = function(value) {
|
880
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
881
|
+
};
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
/**
|
886
|
+
* List of repeated fields within this message type.
|
887
|
+
* @private {!Array<number>}
|
888
|
+
* @const
|
889
|
+
*/
|
890
|
+
proto.cms.MainPageWidgetResponse.repeatedFields_ = [1];
|
891
|
+
|
892
|
+
|
893
|
+
|
894
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
895
|
+
/**
|
896
|
+
* Creates an object representation of this proto.
|
897
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
898
|
+
* Optional fields that are not set will be set to undefined.
|
899
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
900
|
+
* For the list of reserved names please see:
|
901
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
902
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
903
|
+
* JSPB instance for transitional soy proto support:
|
904
|
+
* http://goto/soy-param-migration
|
905
|
+
* @return {!Object}
|
906
|
+
*/
|
907
|
+
proto.cms.MainPageWidgetResponse.prototype.toObject = function(opt_includeInstance) {
|
908
|
+
return proto.cms.MainPageWidgetResponse.toObject(opt_includeInstance, this);
|
909
|
+
};
|
910
|
+
|
911
|
+
|
912
|
+
/**
|
913
|
+
* Static version of the {@see toObject} method.
|
914
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
915
|
+
* the JSPB instance for transitional soy proto support:
|
916
|
+
* http://goto/soy-param-migration
|
917
|
+
* @param {!proto.cms.MainPageWidgetResponse} msg The msg instance to transform.
|
918
|
+
* @return {!Object}
|
919
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
920
|
+
*/
|
921
|
+
proto.cms.MainPageWidgetResponse.toObject = function(includeInstance, msg) {
|
922
|
+
var f, obj = {
|
923
|
+
itemsList: jspb.Message.toObjectList(msg.getItemsList(),
|
924
|
+
proto.cms.MainPageWidgetItem.toObject, includeInstance)
|
925
|
+
};
|
926
|
+
|
927
|
+
if (includeInstance) {
|
928
|
+
obj.$jspbMessageInstance = msg;
|
929
|
+
}
|
930
|
+
return obj;
|
931
|
+
};
|
932
|
+
}
|
933
|
+
|
934
|
+
|
935
|
+
/**
|
936
|
+
* Deserializes binary data (in protobuf wire format).
|
937
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
938
|
+
* @return {!proto.cms.MainPageWidgetResponse}
|
939
|
+
*/
|
940
|
+
proto.cms.MainPageWidgetResponse.deserializeBinary = function(bytes) {
|
941
|
+
var reader = new jspb.BinaryReader(bytes);
|
942
|
+
var msg = new proto.cms.MainPageWidgetResponse;
|
943
|
+
return proto.cms.MainPageWidgetResponse.deserializeBinaryFromReader(msg, reader);
|
944
|
+
};
|
945
|
+
|
946
|
+
|
947
|
+
/**
|
948
|
+
* Deserializes binary data (in protobuf wire format) from the
|
949
|
+
* given reader into the given message object.
|
950
|
+
* @param {!proto.cms.MainPageWidgetResponse} msg The message object to deserialize into.
|
951
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
952
|
+
* @return {!proto.cms.MainPageWidgetResponse}
|
953
|
+
*/
|
954
|
+
proto.cms.MainPageWidgetResponse.deserializeBinaryFromReader = function(msg, reader) {
|
955
|
+
while (reader.nextField()) {
|
956
|
+
if (reader.isEndGroup()) {
|
957
|
+
break;
|
958
|
+
}
|
959
|
+
var field = reader.getFieldNumber();
|
960
|
+
switch (field) {
|
961
|
+
case 1:
|
962
|
+
var value = new proto.cms.MainPageWidgetItem;
|
963
|
+
reader.readMessage(value,proto.cms.MainPageWidgetItem.deserializeBinaryFromReader);
|
964
|
+
msg.addItems(value);
|
965
|
+
break;
|
966
|
+
default:
|
967
|
+
reader.skipField();
|
968
|
+
break;
|
969
|
+
}
|
970
|
+
}
|
971
|
+
return msg;
|
972
|
+
};
|
973
|
+
|
974
|
+
|
975
|
+
/**
|
976
|
+
* Serializes the message to binary data (in protobuf wire format).
|
977
|
+
* @return {!Uint8Array}
|
978
|
+
*/
|
979
|
+
proto.cms.MainPageWidgetResponse.prototype.serializeBinary = function() {
|
980
|
+
var writer = new jspb.BinaryWriter();
|
981
|
+
proto.cms.MainPageWidgetResponse.serializeBinaryToWriter(this, writer);
|
982
|
+
return writer.getResultBuffer();
|
983
|
+
};
|
984
|
+
|
985
|
+
|
986
|
+
/**
|
987
|
+
* Serializes the given message to binary data (in protobuf wire
|
988
|
+
* format), writing to the given BinaryWriter.
|
989
|
+
* @param {!proto.cms.MainPageWidgetResponse} message
|
990
|
+
* @param {!jspb.BinaryWriter} writer
|
991
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
992
|
+
*/
|
993
|
+
proto.cms.MainPageWidgetResponse.serializeBinaryToWriter = function(message, writer) {
|
994
|
+
var f = undefined;
|
995
|
+
f = message.getItemsList();
|
996
|
+
if (f.length > 0) {
|
997
|
+
writer.writeRepeatedMessage(
|
998
|
+
1,
|
999
|
+
f,
|
1000
|
+
proto.cms.MainPageWidgetItem.serializeBinaryToWriter
|
1001
|
+
);
|
1002
|
+
}
|
1003
|
+
};
|
1004
|
+
|
1005
|
+
|
1006
|
+
/**
|
1007
|
+
* repeated MainPageWidgetItem items = 1;
|
1008
|
+
* @return {!Array<!proto.cms.MainPageWidgetItem>}
|
1009
|
+
*/
|
1010
|
+
proto.cms.MainPageWidgetResponse.prototype.getItemsList = function() {
|
1011
|
+
return /** @type{!Array<!proto.cms.MainPageWidgetItem>} */ (
|
1012
|
+
jspb.Message.getRepeatedWrapperField(this, proto.cms.MainPageWidgetItem, 1));
|
1013
|
+
};
|
1014
|
+
|
1015
|
+
|
1016
|
+
/**
|
1017
|
+
* @param {!Array<!proto.cms.MainPageWidgetItem>} value
|
1018
|
+
* @return {!proto.cms.MainPageWidgetResponse} returns this
|
1019
|
+
*/
|
1020
|
+
proto.cms.MainPageWidgetResponse.prototype.setItemsList = function(value) {
|
1021
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
1022
|
+
};
|
1023
|
+
|
1024
|
+
|
1025
|
+
/**
|
1026
|
+
* @param {!proto.cms.MainPageWidgetItem=} opt_value
|
1027
|
+
* @param {number=} opt_index
|
1028
|
+
* @return {!proto.cms.MainPageWidgetItem}
|
1029
|
+
*/
|
1030
|
+
proto.cms.MainPageWidgetResponse.prototype.addItems = function(opt_value, opt_index) {
|
1031
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cms.MainPageWidgetItem, opt_index);
|
1032
|
+
};
|
1033
|
+
|
1034
|
+
|
1035
|
+
/**
|
1036
|
+
* Clears the list making it empty but non-null.
|
1037
|
+
* @return {!proto.cms.MainPageWidgetResponse} returns this
|
1038
|
+
*/
|
1039
|
+
proto.cms.MainPageWidgetResponse.prototype.clearItemsList = function() {
|
1040
|
+
return this.setItemsList([]);
|
1041
|
+
};
|
1042
|
+
|
1043
|
+
|
1044
|
+
goog.object.extend(exports, proto.cms);
|
package/index.js
CHANGED
@@ -13,6 +13,8 @@ const FileService = require('./file/file_grpc_pb');
|
|
13
13
|
const FileServiceMessages = require('./file/file_pb');
|
14
14
|
const BetService = require('./bet/bet_grpc_pb');
|
15
15
|
const BetServiceMessages = require('./bet/bet_pb');
|
16
|
+
const CMSService = require('./cms/cms_grpc_pb');
|
17
|
+
const CMSServiceMessages = require('./cms/cms_pb');
|
16
18
|
module.exports = {
|
17
19
|
gRPC: gRPC,
|
18
20
|
maxSendMessageLength: 10388608,
|
@@ -42,4 +44,8 @@ module.exports = {
|
|
42
44
|
service: BetService,
|
43
45
|
messages: BetServiceMessages
|
44
46
|
},
|
47
|
+
cms: {
|
48
|
+
service: CMSService,
|
49
|
+
messages: CMSServiceMessages
|
50
|
+
},
|
45
51
|
};
|
package/package.json
CHANGED
package/update_protobuf.sh
CHANGED
@@ -5,4 +5,5 @@ grpc_tools_node_protoc --js_out=import_style=commonjs,binary:user --grpc_out=grp
|
|
5
5
|
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:log --grpc_out=grpc_js:log --proto_path=./log ./log/*.proto &&
|
6
6
|
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:game --grpc_out=grpc_js:game --proto_path=./game ./game/*.proto &&
|
7
7
|
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:file --grpc_out=grpc_js:file --proto_path=./file ./file/*.proto &&
|
8
|
-
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:bet --grpc_out=grpc_js:bet --proto_path=./bet ./bet/*.proto
|
8
|
+
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:bet --grpc_out=grpc_js:bet --proto_path=./bet ./bet/*.proto &&
|
9
|
+
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:cms --grpc_out=grpc_js:cms --proto_path=./cms ./cms/*.proto
|