@scrawn/core 0.0.2 → 0.0.3
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/README.md +40 -0
- package/dist/gen/auth/v1/auth_grpc_pb.js +45 -0
- package/dist/gen/auth/v1/auth_pb.js +471 -86
- package/dist/gen/data/v1/data_grpc_pb.js +44 -0
- package/dist/gen/data/v1/data_pb.js +1530 -0
- package/dist/gen/event/v1/event_grpc_pb.js +79 -0
- package/dist/gen/event/v1/event_pb.js +1862 -138
- package/dist/gen/package.json +3 -0
- package/dist/gen/payment/v1/payment_grpc_pb.js +45 -0
- package/dist/gen/payment/v1/payment_pb.js +321 -59
- package/dist/gen/query/v1/query_grpc_pb.js +44 -0
- package/dist/gen/query/v1/query_pb.js +2327 -0
- package/package.json +18 -14
- package/dist/config.d.ts +0 -26
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -25
- package/dist/config.js.map +0 -1
- package/dist/core/auth/apiKeyAuth.d.ts +0 -67
- package/dist/core/auth/apiKeyAuth.d.ts.map +0 -1
- package/dist/core/auth/apiKeyAuth.js +0 -71
- package/dist/core/auth/apiKeyAuth.js.map +0 -1
- package/dist/core/auth/baseAuth.d.ts +0 -92
- package/dist/core/auth/baseAuth.d.ts.map +0 -1
- package/dist/core/auth/baseAuth.js +0 -28
- package/dist/core/auth/baseAuth.js.map +0 -1
- package/dist/core/grpc/client.d.ts +0 -126
- package/dist/core/grpc/client.d.ts.map +0 -1
- package/dist/core/grpc/client.js +0 -138
- package/dist/core/grpc/client.js.map +0 -1
- package/dist/core/grpc/index.d.ts +0 -12
- package/dist/core/grpc/index.d.ts.map +0 -1
- package/dist/core/grpc/index.js +0 -11
- package/dist/core/grpc/index.js.map +0 -1
- package/dist/core/grpc/requestBuilder.d.ts +0 -116
- package/dist/core/grpc/requestBuilder.d.ts.map +0 -1
- package/dist/core/grpc/requestBuilder.js +0 -146
- package/dist/core/grpc/requestBuilder.js.map +0 -1
- package/dist/core/grpc/types.d.ts +0 -54
- package/dist/core/grpc/types.d.ts.map +0 -1
- package/dist/core/grpc/types.js +0 -9
- package/dist/core/grpc/types.js.map +0 -1
- package/dist/core/scrawn.d.ts +0 -197
- package/dist/core/scrawn.d.ts.map +0 -1
- package/dist/core/scrawn.js +0 -331
- package/dist/core/scrawn.js.map +0 -1
- package/dist/core/types/auth.d.ts +0 -31
- package/dist/core/types/auth.d.ts.map +0 -1
- package/dist/core/types/auth.js +0 -2
- package/dist/core/types/auth.js.map +0 -1
- package/dist/core/types/event.d.ts +0 -119
- package/dist/core/types/event.d.ts.map +0 -1
- package/dist/core/types/event.js +0 -15
- package/dist/core/types/event.js.map +0 -1
- package/dist/gen/auth/v1/auth_connect.d.ts +0 -22
- package/dist/gen/auth/v1/auth_connect.d.ts.map +0 -1
- package/dist/gen/auth/v1/auth_connect.js +0 -26
- package/dist/gen/auth/v1/auth_connect.js.map +0 -1
- package/dist/gen/auth/v1/auth_pb.d.ts +0 -59
- package/dist/gen/auth/v1/auth_pb.d.ts.map +0 -1
- package/dist/gen/auth/v1/auth_pb.js.map +0 -1
- package/dist/gen/event/v1/event_connect.d.ts +0 -22
- package/dist/gen/event/v1/event_connect.d.ts.map +0 -1
- package/dist/gen/event/v1/event_connect.js +0 -26
- package/dist/gen/event/v1/event_connect.js.map +0 -1
- package/dist/gen/event/v1/event_pb.d.ts +0 -105
- package/dist/gen/event/v1/event_pb.d.ts.map +0 -1
- package/dist/gen/event/v1/event_pb.js.map +0 -1
- package/dist/gen/payment/v1/payment_connect.d.ts +0 -22
- package/dist/gen/payment/v1/payment_connect.d.ts.map +0 -1
- package/dist/gen/payment/v1/payment_connect.js +0 -26
- package/dist/gen/payment/v1/payment_connect.js.map +0 -1
- package/dist/gen/payment/v1/payment_pb.d.ts +0 -37
- package/dist/gen/payment/v1/payment_pb.d.ts.map +0 -1
- package/dist/gen/payment/v1/payment_pb.js.map +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -15
- package/dist/index.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -10
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -62
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/pathMatcher.d.ts +0 -25
- package/dist/utils/pathMatcher.d.ts.map +0 -1
- package/dist/utils/pathMatcher.js +0 -46
- package/dist/utils/pathMatcher.js.map +0 -1
|
@@ -1,154 +1,1878 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
1
|
+
// source: event/v1/event.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!
|
|
3
11
|
/* eslint-disable */
|
|
4
12
|
// @ts-nocheck
|
|
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
|
-
|
|
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.event.v1.AITokenUsage', null, global);
|
|
25
|
+
goog.exportSymbol('proto.event.v1.AITokenUsage.InputdebitCase', null, global);
|
|
26
|
+
goog.exportSymbol('proto.event.v1.AITokenUsage.OutputdebitCase', null, global);
|
|
27
|
+
goog.exportSymbol('proto.event.v1.EventType', null, global);
|
|
28
|
+
goog.exportSymbol('proto.event.v1.RegisterEventRequest', null, global);
|
|
29
|
+
goog.exportSymbol('proto.event.v1.RegisterEventRequest.DataCase', null, global);
|
|
30
|
+
goog.exportSymbol('proto.event.v1.RegisterEventResponse', null, global);
|
|
31
|
+
goog.exportSymbol('proto.event.v1.SDKCall', null, global);
|
|
32
|
+
goog.exportSymbol('proto.event.v1.SDKCall.DebitCase', null, global);
|
|
33
|
+
goog.exportSymbol('proto.event.v1.SDKCallType', null, global);
|
|
34
|
+
goog.exportSymbol('proto.event.v1.StreamEventRequest', null, global);
|
|
35
|
+
goog.exportSymbol('proto.event.v1.StreamEventRequest.DataCase', null, global);
|
|
36
|
+
goog.exportSymbol('proto.event.v1.StreamEventResponse', null, global);
|
|
37
|
+
/**
|
|
38
|
+
* Generated by JsPbCodeGenerator.
|
|
39
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
40
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
41
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
42
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
43
|
+
* valid.
|
|
44
|
+
* @extends {jspb.Message}
|
|
45
|
+
* @constructor
|
|
46
|
+
*/
|
|
47
|
+
proto.event.v1.RegisterEventRequest = function(opt_data) {
|
|
48
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.event.v1.RegisterEventRequest.oneofGroups_);
|
|
49
|
+
};
|
|
50
|
+
goog.inherits(proto.event.v1.RegisterEventRequest, jspb.Message);
|
|
51
|
+
if (goog.DEBUG && !COMPILED) {
|
|
52
|
+
/**
|
|
53
|
+
* @public
|
|
54
|
+
* @override
|
|
55
|
+
*/
|
|
56
|
+
proto.event.v1.RegisterEventRequest.displayName = 'proto.event.v1.RegisterEventRequest';
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Generated by JsPbCodeGenerator.
|
|
60
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
61
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
62
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
63
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
64
|
+
* valid.
|
|
65
|
+
* @extends {jspb.Message}
|
|
66
|
+
* @constructor
|
|
67
|
+
*/
|
|
68
|
+
proto.event.v1.SDKCall = function(opt_data) {
|
|
69
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.event.v1.SDKCall.oneofGroups_);
|
|
70
|
+
};
|
|
71
|
+
goog.inherits(proto.event.v1.SDKCall, jspb.Message);
|
|
72
|
+
if (goog.DEBUG && !COMPILED) {
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
* @override
|
|
76
|
+
*/
|
|
77
|
+
proto.event.v1.SDKCall.displayName = 'proto.event.v1.SDKCall';
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Generated by JsPbCodeGenerator.
|
|
81
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
82
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
83
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
84
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
85
|
+
* valid.
|
|
86
|
+
* @extends {jspb.Message}
|
|
87
|
+
* @constructor
|
|
88
|
+
*/
|
|
89
|
+
proto.event.v1.RegisterEventResponse = function(opt_data) {
|
|
90
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
91
|
+
};
|
|
92
|
+
goog.inherits(proto.event.v1.RegisterEventResponse, jspb.Message);
|
|
93
|
+
if (goog.DEBUG && !COMPILED) {
|
|
94
|
+
/**
|
|
95
|
+
* @public
|
|
96
|
+
* @override
|
|
97
|
+
*/
|
|
98
|
+
proto.event.v1.RegisterEventResponse.displayName = 'proto.event.v1.RegisterEventResponse';
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Generated by JsPbCodeGenerator.
|
|
102
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
103
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
104
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
105
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
106
|
+
* valid.
|
|
107
|
+
* @extends {jspb.Message}
|
|
108
|
+
* @constructor
|
|
109
|
+
*/
|
|
110
|
+
proto.event.v1.StreamEventRequest = function(opt_data) {
|
|
111
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.event.v1.StreamEventRequest.oneofGroups_);
|
|
112
|
+
};
|
|
113
|
+
goog.inherits(proto.event.v1.StreamEventRequest, jspb.Message);
|
|
114
|
+
if (goog.DEBUG && !COMPILED) {
|
|
115
|
+
/**
|
|
116
|
+
* @public
|
|
117
|
+
* @override
|
|
118
|
+
*/
|
|
119
|
+
proto.event.v1.StreamEventRequest.displayName = 'proto.event.v1.StreamEventRequest';
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Generated by JsPbCodeGenerator.
|
|
123
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
124
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
125
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
126
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
127
|
+
* valid.
|
|
128
|
+
* @extends {jspb.Message}
|
|
129
|
+
* @constructor
|
|
130
|
+
*/
|
|
131
|
+
proto.event.v1.AITokenUsage = function(opt_data) {
|
|
132
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.event.v1.AITokenUsage.oneofGroups_);
|
|
133
|
+
};
|
|
134
|
+
goog.inherits(proto.event.v1.AITokenUsage, jspb.Message);
|
|
135
|
+
if (goog.DEBUG && !COMPILED) {
|
|
136
|
+
/**
|
|
137
|
+
* @public
|
|
138
|
+
* @override
|
|
139
|
+
*/
|
|
140
|
+
proto.event.v1.AITokenUsage.displayName = 'proto.event.v1.AITokenUsage';
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Generated by JsPbCodeGenerator.
|
|
144
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
145
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
146
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
147
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
148
|
+
* valid.
|
|
149
|
+
* @extends {jspb.Message}
|
|
150
|
+
* @constructor
|
|
151
|
+
*/
|
|
152
|
+
proto.event.v1.StreamEventResponse = function(opt_data) {
|
|
153
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
154
|
+
};
|
|
155
|
+
goog.inherits(proto.event.v1.StreamEventResponse, jspb.Message);
|
|
156
|
+
if (goog.DEBUG && !COMPILED) {
|
|
157
|
+
/**
|
|
158
|
+
* @public
|
|
159
|
+
* @override
|
|
160
|
+
*/
|
|
161
|
+
proto.event.v1.StreamEventResponse.displayName = 'proto.event.v1.StreamEventResponse';
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Oneof group definitions for this message. Each group defines the field
|
|
166
|
+
* numbers belonging to that group. When of these fields' value is set, all
|
|
167
|
+
* other fields in the group are cleared. During deserialization, if multiple
|
|
168
|
+
* fields are encountered for a group, only the last value seen will be kept.
|
|
169
|
+
* @private {!Array<!Array<number>>}
|
|
170
|
+
* @const
|
|
171
|
+
*/
|
|
172
|
+
proto.event.v1.RegisterEventRequest.oneofGroups_ = [[4]];
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @enum {number}
|
|
176
|
+
*/
|
|
177
|
+
proto.event.v1.RegisterEventRequest.DataCase = {
|
|
178
|
+
DATA_NOT_SET: 0,
|
|
179
|
+
SDKCALL: 4
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @return {proto.event.v1.RegisterEventRequest.DataCase}
|
|
184
|
+
*/
|
|
185
|
+
proto.event.v1.RegisterEventRequest.prototype.getDataCase = function() {
|
|
186
|
+
return /** @type {proto.event.v1.RegisterEventRequest.DataCase} */(jspb.Message.computeOneofCase(this, proto.event.v1.RegisterEventRequest.oneofGroups_[0]));
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
192
|
+
/**
|
|
193
|
+
* Creates an object representation of this proto.
|
|
194
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
195
|
+
* Optional fields that are not set will be set to undefined.
|
|
196
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
197
|
+
* For the list of reserved names please see:
|
|
198
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
199
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
200
|
+
* JSPB instance for transitional soy proto support:
|
|
201
|
+
* http://goto/soy-param-migration
|
|
202
|
+
* @return {!Object}
|
|
203
|
+
*/
|
|
204
|
+
proto.event.v1.RegisterEventRequest.prototype.toObject = function(opt_includeInstance) {
|
|
205
|
+
return proto.event.v1.RegisterEventRequest.toObject(opt_includeInstance, this);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Static version of the {@see toObject} method.
|
|
211
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
212
|
+
* the JSPB instance for transitional soy proto support:
|
|
213
|
+
* http://goto/soy-param-migration
|
|
214
|
+
* @param {!proto.event.v1.RegisterEventRequest} msg The msg instance to transform.
|
|
215
|
+
* @return {!Object}
|
|
216
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
217
|
+
*/
|
|
218
|
+
proto.event.v1.RegisterEventRequest.toObject = function(includeInstance, msg) {
|
|
219
|
+
var f, obj = {
|
|
220
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
221
|
+
userid: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
222
|
+
reportedtimestamp: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
223
|
+
sdkcall: (f = msg.getSdkcall()) && proto.event.v1.SDKCall.toObject(includeInstance, f)
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
if (includeInstance) {
|
|
227
|
+
obj.$jspbMessageInstance = msg;
|
|
228
|
+
}
|
|
229
|
+
return obj;
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Deserializes binary data (in protobuf wire format).
|
|
236
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
237
|
+
* @return {!proto.event.v1.RegisterEventRequest}
|
|
238
|
+
*/
|
|
239
|
+
proto.event.v1.RegisterEventRequest.deserializeBinary = function(bytes) {
|
|
240
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
241
|
+
var msg = new proto.event.v1.RegisterEventRequest;
|
|
242
|
+
return proto.event.v1.RegisterEventRequest.deserializeBinaryFromReader(msg, reader);
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
248
|
+
* given reader into the given message object.
|
|
249
|
+
* @param {!proto.event.v1.RegisterEventRequest} msg The message object to deserialize into.
|
|
250
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
251
|
+
* @return {!proto.event.v1.RegisterEventRequest}
|
|
252
|
+
*/
|
|
253
|
+
proto.event.v1.RegisterEventRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
254
|
+
while (reader.nextField()) {
|
|
255
|
+
if (reader.isEndGroup()) {
|
|
256
|
+
break;
|
|
71
257
|
}
|
|
72
|
-
|
|
73
|
-
|
|
258
|
+
var field = reader.getFieldNumber();
|
|
259
|
+
switch (field) {
|
|
260
|
+
case 1:
|
|
261
|
+
var value = /** @type {!proto.event.v1.EventType} */ (reader.readEnum());
|
|
262
|
+
msg.setType(value);
|
|
263
|
+
break;
|
|
264
|
+
case 2:
|
|
265
|
+
var value = /** @type {string} */ (reader.readString());
|
|
266
|
+
msg.setUserid(value);
|
|
267
|
+
break;
|
|
268
|
+
case 3:
|
|
269
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
270
|
+
msg.setReportedtimestamp(value);
|
|
271
|
+
break;
|
|
272
|
+
case 4:
|
|
273
|
+
var value = new proto.event.v1.SDKCall;
|
|
274
|
+
reader.readMessage(value,proto.event.v1.SDKCall.deserializeBinaryFromReader);
|
|
275
|
+
msg.setSdkcall(value);
|
|
276
|
+
break;
|
|
277
|
+
default:
|
|
278
|
+
reader.skipField();
|
|
279
|
+
break;
|
|
74
280
|
}
|
|
75
|
-
|
|
76
|
-
|
|
281
|
+
}
|
|
282
|
+
return msg;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
288
|
+
* @return {!Uint8Array}
|
|
289
|
+
*/
|
|
290
|
+
proto.event.v1.RegisterEventRequest.prototype.serializeBinary = function() {
|
|
291
|
+
var writer = new jspb.BinaryWriter();
|
|
292
|
+
proto.event.v1.RegisterEventRequest.serializeBinaryToWriter(this, writer);
|
|
293
|
+
return writer.getResultBuffer();
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
299
|
+
* format), writing to the given BinaryWriter.
|
|
300
|
+
* @param {!proto.event.v1.RegisterEventRequest} message
|
|
301
|
+
* @param {!jspb.BinaryWriter} writer
|
|
302
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
303
|
+
*/
|
|
304
|
+
proto.event.v1.RegisterEventRequest.serializeBinaryToWriter = function(message, writer) {
|
|
305
|
+
var f = undefined;
|
|
306
|
+
f = message.getType();
|
|
307
|
+
if (f !== 0.0) {
|
|
308
|
+
writer.writeEnum(
|
|
309
|
+
1,
|
|
310
|
+
f
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
f = message.getUserid();
|
|
314
|
+
if (f.length > 0) {
|
|
315
|
+
writer.writeString(
|
|
316
|
+
2,
|
|
317
|
+
f
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
f = message.getReportedtimestamp();
|
|
321
|
+
if (f !== 0) {
|
|
322
|
+
writer.writeInt32(
|
|
323
|
+
3,
|
|
324
|
+
f
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
f = message.getSdkcall();
|
|
328
|
+
if (f != null) {
|
|
329
|
+
writer.writeMessage(
|
|
330
|
+
4,
|
|
331
|
+
f,
|
|
332
|
+
proto.event.v1.SDKCall.serializeBinaryToWriter
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* optional EventType type = 1;
|
|
340
|
+
* @return {!proto.event.v1.EventType}
|
|
341
|
+
*/
|
|
342
|
+
proto.event.v1.RegisterEventRequest.prototype.getType = function() {
|
|
343
|
+
return /** @type {!proto.event.v1.EventType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* @param {!proto.event.v1.EventType} value
|
|
349
|
+
* @return {!proto.event.v1.RegisterEventRequest} returns this
|
|
350
|
+
*/
|
|
351
|
+
proto.event.v1.RegisterEventRequest.prototype.setType = function(value) {
|
|
352
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* optional string userId = 2;
|
|
358
|
+
* @return {string}
|
|
359
|
+
*/
|
|
360
|
+
proto.event.v1.RegisterEventRequest.prototype.getUserid = function() {
|
|
361
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* @param {string} value
|
|
367
|
+
* @return {!proto.event.v1.RegisterEventRequest} returns this
|
|
368
|
+
*/
|
|
369
|
+
proto.event.v1.RegisterEventRequest.prototype.setUserid = function(value) {
|
|
370
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* optional int32 reportedTimestamp = 3;
|
|
376
|
+
* @return {number}
|
|
377
|
+
*/
|
|
378
|
+
proto.event.v1.RegisterEventRequest.prototype.getReportedtimestamp = function() {
|
|
379
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* @param {number} value
|
|
385
|
+
* @return {!proto.event.v1.RegisterEventRequest} returns this
|
|
386
|
+
*/
|
|
387
|
+
proto.event.v1.RegisterEventRequest.prototype.setReportedtimestamp = function(value) {
|
|
388
|
+
return jspb.Message.setProto3IntField(this, 3, value);
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* optional SDKCall sdkCall = 4;
|
|
394
|
+
* @return {?proto.event.v1.SDKCall}
|
|
395
|
+
*/
|
|
396
|
+
proto.event.v1.RegisterEventRequest.prototype.getSdkcall = function() {
|
|
397
|
+
return /** @type{?proto.event.v1.SDKCall} */ (
|
|
398
|
+
jspb.Message.getWrapperField(this, proto.event.v1.SDKCall, 4));
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* @param {?proto.event.v1.SDKCall|undefined} value
|
|
404
|
+
* @return {!proto.event.v1.RegisterEventRequest} returns this
|
|
405
|
+
*/
|
|
406
|
+
proto.event.v1.RegisterEventRequest.prototype.setSdkcall = function(value) {
|
|
407
|
+
return jspb.Message.setOneofWrapperField(this, 4, proto.event.v1.RegisterEventRequest.oneofGroups_[0], value);
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Clears the message field making it undefined.
|
|
413
|
+
* @return {!proto.event.v1.RegisterEventRequest} returns this
|
|
414
|
+
*/
|
|
415
|
+
proto.event.v1.RegisterEventRequest.prototype.clearSdkcall = function() {
|
|
416
|
+
return this.setSdkcall(undefined);
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Returns whether this field is set.
|
|
422
|
+
* @return {boolean}
|
|
423
|
+
*/
|
|
424
|
+
proto.event.v1.RegisterEventRequest.prototype.hasSdkcall = function() {
|
|
425
|
+
return jspb.Message.getField(this, 4) != null;
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Oneof group definitions for this message. Each group defines the field
|
|
432
|
+
* numbers belonging to that group. When of these fields' value is set, all
|
|
433
|
+
* other fields in the group are cleared. During deserialization, if multiple
|
|
434
|
+
* fields are encountered for a group, only the last value seen will be kept.
|
|
435
|
+
* @private {!Array<!Array<number>>}
|
|
436
|
+
* @const
|
|
437
|
+
*/
|
|
438
|
+
proto.event.v1.SDKCall.oneofGroups_ = [[2,3,4]];
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* @enum {number}
|
|
442
|
+
*/
|
|
443
|
+
proto.event.v1.SDKCall.DebitCase = {
|
|
444
|
+
DEBIT_NOT_SET: 0,
|
|
445
|
+
AMOUNT: 2,
|
|
446
|
+
TAG: 3,
|
|
447
|
+
EXPR: 4
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* @return {proto.event.v1.SDKCall.DebitCase}
|
|
452
|
+
*/
|
|
453
|
+
proto.event.v1.SDKCall.prototype.getDebitCase = function() {
|
|
454
|
+
return /** @type {proto.event.v1.SDKCall.DebitCase} */(jspb.Message.computeOneofCase(this, proto.event.v1.SDKCall.oneofGroups_[0]));
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
460
|
+
/**
|
|
461
|
+
* Creates an object representation of this proto.
|
|
462
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
463
|
+
* Optional fields that are not set will be set to undefined.
|
|
464
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
465
|
+
* For the list of reserved names please see:
|
|
466
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
467
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
468
|
+
* JSPB instance for transitional soy proto support:
|
|
469
|
+
* http://goto/soy-param-migration
|
|
470
|
+
* @return {!Object}
|
|
471
|
+
*/
|
|
472
|
+
proto.event.v1.SDKCall.prototype.toObject = function(opt_includeInstance) {
|
|
473
|
+
return proto.event.v1.SDKCall.toObject(opt_includeInstance, this);
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Static version of the {@see toObject} method.
|
|
479
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
480
|
+
* the JSPB instance for transitional soy proto support:
|
|
481
|
+
* http://goto/soy-param-migration
|
|
482
|
+
* @param {!proto.event.v1.SDKCall} msg The msg instance to transform.
|
|
483
|
+
* @return {!Object}
|
|
484
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
485
|
+
*/
|
|
486
|
+
proto.event.v1.SDKCall.toObject = function(includeInstance, msg) {
|
|
487
|
+
var f, obj = {
|
|
488
|
+
sdkcalltype: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
489
|
+
amount: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
|
|
490
|
+
tag: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
491
|
+
expr: jspb.Message.getFieldWithDefault(msg, 4, "")
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
if (includeInstance) {
|
|
495
|
+
obj.$jspbMessageInstance = msg;
|
|
496
|
+
}
|
|
497
|
+
return obj;
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Deserializes binary data (in protobuf wire format).
|
|
504
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
505
|
+
* @return {!proto.event.v1.SDKCall}
|
|
506
|
+
*/
|
|
507
|
+
proto.event.v1.SDKCall.deserializeBinary = function(bytes) {
|
|
508
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
509
|
+
var msg = new proto.event.v1.SDKCall;
|
|
510
|
+
return proto.event.v1.SDKCall.deserializeBinaryFromReader(msg, reader);
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
516
|
+
* given reader into the given message object.
|
|
517
|
+
* @param {!proto.event.v1.SDKCall} msg The message object to deserialize into.
|
|
518
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
519
|
+
* @return {!proto.event.v1.SDKCall}
|
|
520
|
+
*/
|
|
521
|
+
proto.event.v1.SDKCall.deserializeBinaryFromReader = function(msg, reader) {
|
|
522
|
+
while (reader.nextField()) {
|
|
523
|
+
if (reader.isEndGroup()) {
|
|
524
|
+
break;
|
|
77
525
|
}
|
|
78
|
-
|
|
79
|
-
|
|
526
|
+
var field = reader.getFieldNumber();
|
|
527
|
+
switch (field) {
|
|
528
|
+
case 1:
|
|
529
|
+
var value = /** @type {!proto.event.v1.SDKCallType} */ (reader.readEnum());
|
|
530
|
+
msg.setSdkcalltype(value);
|
|
531
|
+
break;
|
|
532
|
+
case 2:
|
|
533
|
+
var value = /** @type {number} */ (reader.readFloat());
|
|
534
|
+
msg.setAmount(value);
|
|
535
|
+
break;
|
|
536
|
+
case 3:
|
|
537
|
+
var value = /** @type {string} */ (reader.readString());
|
|
538
|
+
msg.setTag(value);
|
|
539
|
+
break;
|
|
540
|
+
case 4:
|
|
541
|
+
var value = /** @type {string} */ (reader.readString());
|
|
542
|
+
msg.setExpr(value);
|
|
543
|
+
break;
|
|
544
|
+
default:
|
|
545
|
+
reader.skipField();
|
|
546
|
+
break;
|
|
80
547
|
}
|
|
548
|
+
}
|
|
549
|
+
return msg;
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
555
|
+
* @return {!Uint8Array}
|
|
556
|
+
*/
|
|
557
|
+
proto.event.v1.SDKCall.prototype.serializeBinary = function() {
|
|
558
|
+
var writer = new jspb.BinaryWriter();
|
|
559
|
+
proto.event.v1.SDKCall.serializeBinaryToWriter(this, writer);
|
|
560
|
+
return writer.getResultBuffer();
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
566
|
+
* format), writing to the given BinaryWriter.
|
|
567
|
+
* @param {!proto.event.v1.SDKCall} message
|
|
568
|
+
* @param {!jspb.BinaryWriter} writer
|
|
569
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
570
|
+
*/
|
|
571
|
+
proto.event.v1.SDKCall.serializeBinaryToWriter = function(message, writer) {
|
|
572
|
+
var f = undefined;
|
|
573
|
+
f = message.getSdkcalltype();
|
|
574
|
+
if (f !== 0.0) {
|
|
575
|
+
writer.writeEnum(
|
|
576
|
+
1,
|
|
577
|
+
f
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
|
581
|
+
if (f != null) {
|
|
582
|
+
writer.writeFloat(
|
|
583
|
+
2,
|
|
584
|
+
f
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
|
588
|
+
if (f != null) {
|
|
589
|
+
writer.writeString(
|
|
590
|
+
3,
|
|
591
|
+
f
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
|
595
|
+
if (f != null) {
|
|
596
|
+
writer.writeString(
|
|
597
|
+
4,
|
|
598
|
+
f
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* optional SDKCallType sdkCallType = 1;
|
|
606
|
+
* @return {!proto.event.v1.SDKCallType}
|
|
607
|
+
*/
|
|
608
|
+
proto.event.v1.SDKCall.prototype.getSdkcalltype = function() {
|
|
609
|
+
return /** @type {!proto.event.v1.SDKCallType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* @param {!proto.event.v1.SDKCallType} value
|
|
615
|
+
* @return {!proto.event.v1.SDKCall} returns this
|
|
616
|
+
*/
|
|
617
|
+
proto.event.v1.SDKCall.prototype.setSdkcalltype = function(value) {
|
|
618
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* optional float amount = 2;
|
|
624
|
+
* @return {number}
|
|
625
|
+
*/
|
|
626
|
+
proto.event.v1.SDKCall.prototype.getAmount = function() {
|
|
627
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* @param {number} value
|
|
633
|
+
* @return {!proto.event.v1.SDKCall} returns this
|
|
634
|
+
*/
|
|
635
|
+
proto.event.v1.SDKCall.prototype.setAmount = function(value) {
|
|
636
|
+
return jspb.Message.setOneofField(this, 2, proto.event.v1.SDKCall.oneofGroups_[0], value);
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Clears the field making it undefined.
|
|
642
|
+
* @return {!proto.event.v1.SDKCall} returns this
|
|
643
|
+
*/
|
|
644
|
+
proto.event.v1.SDKCall.prototype.clearAmount = function() {
|
|
645
|
+
return jspb.Message.setOneofField(this, 2, proto.event.v1.SDKCall.oneofGroups_[0], undefined);
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* Returns whether this field is set.
|
|
651
|
+
* @return {boolean}
|
|
652
|
+
*/
|
|
653
|
+
proto.event.v1.SDKCall.prototype.hasAmount = function() {
|
|
654
|
+
return jspb.Message.getField(this, 2) != null;
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* optional string tag = 3;
|
|
660
|
+
* @return {string}
|
|
661
|
+
*/
|
|
662
|
+
proto.event.v1.SDKCall.prototype.getTag = function() {
|
|
663
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* @param {string} value
|
|
669
|
+
* @return {!proto.event.v1.SDKCall} returns this
|
|
670
|
+
*/
|
|
671
|
+
proto.event.v1.SDKCall.prototype.setTag = function(value) {
|
|
672
|
+
return jspb.Message.setOneofField(this, 3, proto.event.v1.SDKCall.oneofGroups_[0], value);
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Clears the field making it undefined.
|
|
678
|
+
* @return {!proto.event.v1.SDKCall} returns this
|
|
679
|
+
*/
|
|
680
|
+
proto.event.v1.SDKCall.prototype.clearTag = function() {
|
|
681
|
+
return jspb.Message.setOneofField(this, 3, proto.event.v1.SDKCall.oneofGroups_[0], undefined);
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Returns whether this field is set.
|
|
687
|
+
* @return {boolean}
|
|
688
|
+
*/
|
|
689
|
+
proto.event.v1.SDKCall.prototype.hasTag = function() {
|
|
690
|
+
return jspb.Message.getField(this, 3) != null;
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* optional string expr = 4;
|
|
696
|
+
* @return {string}
|
|
697
|
+
*/
|
|
698
|
+
proto.event.v1.SDKCall.prototype.getExpr = function() {
|
|
699
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* @param {string} value
|
|
705
|
+
* @return {!proto.event.v1.SDKCall} returns this
|
|
706
|
+
*/
|
|
707
|
+
proto.event.v1.SDKCall.prototype.setExpr = function(value) {
|
|
708
|
+
return jspb.Message.setOneofField(this, 4, proto.event.v1.SDKCall.oneofGroups_[0], value);
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Clears the field making it undefined.
|
|
714
|
+
* @return {!proto.event.v1.SDKCall} returns this
|
|
715
|
+
*/
|
|
716
|
+
proto.event.v1.SDKCall.prototype.clearExpr = function() {
|
|
717
|
+
return jspb.Message.setOneofField(this, 4, proto.event.v1.SDKCall.oneofGroups_[0], undefined);
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Returns whether this field is set.
|
|
723
|
+
* @return {boolean}
|
|
724
|
+
*/
|
|
725
|
+
proto.event.v1.SDKCall.prototype.hasExpr = function() {
|
|
726
|
+
return jspb.Message.getField(this, 4) != null;
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
734
|
+
/**
|
|
735
|
+
* Creates an object representation of this proto.
|
|
736
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
737
|
+
* Optional fields that are not set will be set to undefined.
|
|
738
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
739
|
+
* For the list of reserved names please see:
|
|
740
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
741
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
742
|
+
* JSPB instance for transitional soy proto support:
|
|
743
|
+
* http://goto/soy-param-migration
|
|
744
|
+
* @return {!Object}
|
|
745
|
+
*/
|
|
746
|
+
proto.event.v1.RegisterEventResponse.prototype.toObject = function(opt_includeInstance) {
|
|
747
|
+
return proto.event.v1.RegisterEventResponse.toObject(opt_includeInstance, this);
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Static version of the {@see toObject} method.
|
|
753
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
754
|
+
* the JSPB instance for transitional soy proto support:
|
|
755
|
+
* http://goto/soy-param-migration
|
|
756
|
+
* @param {!proto.event.v1.RegisterEventResponse} msg The msg instance to transform.
|
|
757
|
+
* @return {!Object}
|
|
758
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
759
|
+
*/
|
|
760
|
+
proto.event.v1.RegisterEventResponse.toObject = function(includeInstance, msg) {
|
|
761
|
+
var f, obj = {
|
|
762
|
+
random: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
if (includeInstance) {
|
|
766
|
+
obj.$jspbMessageInstance = msg;
|
|
767
|
+
}
|
|
768
|
+
return obj;
|
|
769
|
+
};
|
|
81
770
|
}
|
|
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
|
-
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Deserializes binary data (in protobuf wire format).
|
|
775
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
776
|
+
* @return {!proto.event.v1.RegisterEventResponse}
|
|
777
|
+
*/
|
|
778
|
+
proto.event.v1.RegisterEventResponse.deserializeBinary = function(bytes) {
|
|
779
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
780
|
+
var msg = new proto.event.v1.RegisterEventResponse;
|
|
781
|
+
return proto.event.v1.RegisterEventResponse.deserializeBinaryFromReader(msg, reader);
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
787
|
+
* given reader into the given message object.
|
|
788
|
+
* @param {!proto.event.v1.RegisterEventResponse} msg The message object to deserialize into.
|
|
789
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
790
|
+
* @return {!proto.event.v1.RegisterEventResponse}
|
|
791
|
+
*/
|
|
792
|
+
proto.event.v1.RegisterEventResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
793
|
+
while (reader.nextField()) {
|
|
794
|
+
if (reader.isEndGroup()) {
|
|
795
|
+
break;
|
|
107
796
|
}
|
|
108
|
-
|
|
109
|
-
|
|
797
|
+
var field = reader.getFieldNumber();
|
|
798
|
+
switch (field) {
|
|
799
|
+
case 1:
|
|
800
|
+
var value = /** @type {string} */ (reader.readString());
|
|
801
|
+
msg.setRandom(value);
|
|
802
|
+
break;
|
|
803
|
+
default:
|
|
804
|
+
reader.skipField();
|
|
805
|
+
break;
|
|
110
806
|
}
|
|
111
|
-
|
|
112
|
-
|
|
807
|
+
}
|
|
808
|
+
return msg;
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
814
|
+
* @return {!Uint8Array}
|
|
815
|
+
*/
|
|
816
|
+
proto.event.v1.RegisterEventResponse.prototype.serializeBinary = function() {
|
|
817
|
+
var writer = new jspb.BinaryWriter();
|
|
818
|
+
proto.event.v1.RegisterEventResponse.serializeBinaryToWriter(this, writer);
|
|
819
|
+
return writer.getResultBuffer();
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
825
|
+
* format), writing to the given BinaryWriter.
|
|
826
|
+
* @param {!proto.event.v1.RegisterEventResponse} message
|
|
827
|
+
* @param {!jspb.BinaryWriter} writer
|
|
828
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
829
|
+
*/
|
|
830
|
+
proto.event.v1.RegisterEventResponse.serializeBinaryToWriter = function(message, writer) {
|
|
831
|
+
var f = undefined;
|
|
832
|
+
f = message.getRandom();
|
|
833
|
+
if (f.length > 0) {
|
|
834
|
+
writer.writeString(
|
|
835
|
+
1,
|
|
836
|
+
f
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* optional string random = 1;
|
|
844
|
+
* @return {string}
|
|
845
|
+
*/
|
|
846
|
+
proto.event.v1.RegisterEventResponse.prototype.getRandom = function() {
|
|
847
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* @param {string} value
|
|
853
|
+
* @return {!proto.event.v1.RegisterEventResponse} returns this
|
|
854
|
+
*/
|
|
855
|
+
proto.event.v1.RegisterEventResponse.prototype.setRandom = function(value) {
|
|
856
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Oneof group definitions for this message. Each group defines the field
|
|
863
|
+
* numbers belonging to that group. When of these fields' value is set, all
|
|
864
|
+
* other fields in the group are cleared. During deserialization, if multiple
|
|
865
|
+
* fields are encountered for a group, only the last value seen will be kept.
|
|
866
|
+
* @private {!Array<!Array<number>>}
|
|
867
|
+
* @const
|
|
868
|
+
*/
|
|
869
|
+
proto.event.v1.StreamEventRequest.oneofGroups_ = [[4,5]];
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* @enum {number}
|
|
873
|
+
*/
|
|
874
|
+
proto.event.v1.StreamEventRequest.DataCase = {
|
|
875
|
+
DATA_NOT_SET: 0,
|
|
876
|
+
SDKCALL: 4,
|
|
877
|
+
AITOKENUSAGE: 5
|
|
878
|
+
};
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* @return {proto.event.v1.StreamEventRequest.DataCase}
|
|
882
|
+
*/
|
|
883
|
+
proto.event.v1.StreamEventRequest.prototype.getDataCase = function() {
|
|
884
|
+
return /** @type {proto.event.v1.StreamEventRequest.DataCase} */(jspb.Message.computeOneofCase(this, proto.event.v1.StreamEventRequest.oneofGroups_[0]));
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
890
|
+
/**
|
|
891
|
+
* Creates an object representation of this proto.
|
|
892
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
893
|
+
* Optional fields that are not set will be set to undefined.
|
|
894
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
895
|
+
* For the list of reserved names please see:
|
|
896
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
897
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
898
|
+
* JSPB instance for transitional soy proto support:
|
|
899
|
+
* http://goto/soy-param-migration
|
|
900
|
+
* @return {!Object}
|
|
901
|
+
*/
|
|
902
|
+
proto.event.v1.StreamEventRequest.prototype.toObject = function(opt_includeInstance) {
|
|
903
|
+
return proto.event.v1.StreamEventRequest.toObject(opt_includeInstance, this);
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Static version of the {@see toObject} method.
|
|
909
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
910
|
+
* the JSPB instance for transitional soy proto support:
|
|
911
|
+
* http://goto/soy-param-migration
|
|
912
|
+
* @param {!proto.event.v1.StreamEventRequest} msg The msg instance to transform.
|
|
913
|
+
* @return {!Object}
|
|
914
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
915
|
+
*/
|
|
916
|
+
proto.event.v1.StreamEventRequest.toObject = function(includeInstance, msg) {
|
|
917
|
+
var f, obj = {
|
|
918
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
919
|
+
userid: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
920
|
+
reportedtimestamp: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
921
|
+
sdkcall: (f = msg.getSdkcall()) && proto.event.v1.SDKCall.toObject(includeInstance, f),
|
|
922
|
+
aitokenusage: (f = msg.getAitokenusage()) && proto.event.v1.AITokenUsage.toObject(includeInstance, f)
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
if (includeInstance) {
|
|
926
|
+
obj.$jspbMessageInstance = msg;
|
|
927
|
+
}
|
|
928
|
+
return obj;
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Deserializes binary data (in protobuf wire format).
|
|
935
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
936
|
+
* @return {!proto.event.v1.StreamEventRequest}
|
|
937
|
+
*/
|
|
938
|
+
proto.event.v1.StreamEventRequest.deserializeBinary = function(bytes) {
|
|
939
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
940
|
+
var msg = new proto.event.v1.StreamEventRequest;
|
|
941
|
+
return proto.event.v1.StreamEventRequest.deserializeBinaryFromReader(msg, reader);
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
947
|
+
* given reader into the given message object.
|
|
948
|
+
* @param {!proto.event.v1.StreamEventRequest} msg The message object to deserialize into.
|
|
949
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
950
|
+
* @return {!proto.event.v1.StreamEventRequest}
|
|
951
|
+
*/
|
|
952
|
+
proto.event.v1.StreamEventRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
953
|
+
while (reader.nextField()) {
|
|
954
|
+
if (reader.isEndGroup()) {
|
|
955
|
+
break;
|
|
113
956
|
}
|
|
114
|
-
|
|
115
|
-
|
|
957
|
+
var field = reader.getFieldNumber();
|
|
958
|
+
switch (field) {
|
|
959
|
+
case 1:
|
|
960
|
+
var value = /** @type {!proto.event.v1.EventType} */ (reader.readEnum());
|
|
961
|
+
msg.setType(value);
|
|
962
|
+
break;
|
|
963
|
+
case 2:
|
|
964
|
+
var value = /** @type {string} */ (reader.readString());
|
|
965
|
+
msg.setUserid(value);
|
|
966
|
+
break;
|
|
967
|
+
case 3:
|
|
968
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
969
|
+
msg.setReportedtimestamp(value);
|
|
970
|
+
break;
|
|
971
|
+
case 4:
|
|
972
|
+
var value = new proto.event.v1.SDKCall;
|
|
973
|
+
reader.readMessage(value,proto.event.v1.SDKCall.deserializeBinaryFromReader);
|
|
974
|
+
msg.setSdkcall(value);
|
|
975
|
+
break;
|
|
976
|
+
case 5:
|
|
977
|
+
var value = new proto.event.v1.AITokenUsage;
|
|
978
|
+
reader.readMessage(value,proto.event.v1.AITokenUsage.deserializeBinaryFromReader);
|
|
979
|
+
msg.setAitokenusage(value);
|
|
980
|
+
break;
|
|
981
|
+
default:
|
|
982
|
+
reader.skipField();
|
|
983
|
+
break;
|
|
116
984
|
}
|
|
985
|
+
}
|
|
986
|
+
return msg;
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
992
|
+
* @return {!Uint8Array}
|
|
993
|
+
*/
|
|
994
|
+
proto.event.v1.StreamEventRequest.prototype.serializeBinary = function() {
|
|
995
|
+
var writer = new jspb.BinaryWriter();
|
|
996
|
+
proto.event.v1.StreamEventRequest.serializeBinaryToWriter(this, writer);
|
|
997
|
+
return writer.getResultBuffer();
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
1003
|
+
* format), writing to the given BinaryWriter.
|
|
1004
|
+
* @param {!proto.event.v1.StreamEventRequest} message
|
|
1005
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1006
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1007
|
+
*/
|
|
1008
|
+
proto.event.v1.StreamEventRequest.serializeBinaryToWriter = function(message, writer) {
|
|
1009
|
+
var f = undefined;
|
|
1010
|
+
f = message.getType();
|
|
1011
|
+
if (f !== 0.0) {
|
|
1012
|
+
writer.writeEnum(
|
|
1013
|
+
1,
|
|
1014
|
+
f
|
|
1015
|
+
);
|
|
1016
|
+
}
|
|
1017
|
+
f = message.getUserid();
|
|
1018
|
+
if (f.length > 0) {
|
|
1019
|
+
writer.writeString(
|
|
1020
|
+
2,
|
|
1021
|
+
f
|
|
1022
|
+
);
|
|
1023
|
+
}
|
|
1024
|
+
f = message.getReportedtimestamp();
|
|
1025
|
+
if (f !== 0) {
|
|
1026
|
+
writer.writeInt32(
|
|
1027
|
+
3,
|
|
1028
|
+
f
|
|
1029
|
+
);
|
|
1030
|
+
}
|
|
1031
|
+
f = message.getSdkcall();
|
|
1032
|
+
if (f != null) {
|
|
1033
|
+
writer.writeMessage(
|
|
1034
|
+
4,
|
|
1035
|
+
f,
|
|
1036
|
+
proto.event.v1.SDKCall.serializeBinaryToWriter
|
|
1037
|
+
);
|
|
1038
|
+
}
|
|
1039
|
+
f = message.getAitokenusage();
|
|
1040
|
+
if (f != null) {
|
|
1041
|
+
writer.writeMessage(
|
|
1042
|
+
5,
|
|
1043
|
+
f,
|
|
1044
|
+
proto.event.v1.AITokenUsage.serializeBinaryToWriter
|
|
1045
|
+
);
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* optional EventType type = 1;
|
|
1052
|
+
* @return {!proto.event.v1.EventType}
|
|
1053
|
+
*/
|
|
1054
|
+
proto.event.v1.StreamEventRequest.prototype.getType = function() {
|
|
1055
|
+
return /** @type {!proto.event.v1.EventType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
1056
|
+
};
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* @param {!proto.event.v1.EventType} value
|
|
1061
|
+
* @return {!proto.event.v1.StreamEventRequest} returns this
|
|
1062
|
+
*/
|
|
1063
|
+
proto.event.v1.StreamEventRequest.prototype.setType = function(value) {
|
|
1064
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* optional string userId = 2;
|
|
1070
|
+
* @return {string}
|
|
1071
|
+
*/
|
|
1072
|
+
proto.event.v1.StreamEventRequest.prototype.getUserid = function() {
|
|
1073
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
1074
|
+
};
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* @param {string} value
|
|
1079
|
+
* @return {!proto.event.v1.StreamEventRequest} returns this
|
|
1080
|
+
*/
|
|
1081
|
+
proto.event.v1.StreamEventRequest.prototype.setUserid = function(value) {
|
|
1082
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
1083
|
+
};
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* optional int32 reportedTimestamp = 3;
|
|
1088
|
+
* @return {number}
|
|
1089
|
+
*/
|
|
1090
|
+
proto.event.v1.StreamEventRequest.prototype.getReportedtimestamp = function() {
|
|
1091
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
1092
|
+
};
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* @param {number} value
|
|
1097
|
+
* @return {!proto.event.v1.StreamEventRequest} returns this
|
|
1098
|
+
*/
|
|
1099
|
+
proto.event.v1.StreamEventRequest.prototype.setReportedtimestamp = function(value) {
|
|
1100
|
+
return jspb.Message.setProto3IntField(this, 3, value);
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* optional SDKCall sdkCall = 4;
|
|
1106
|
+
* @return {?proto.event.v1.SDKCall}
|
|
1107
|
+
*/
|
|
1108
|
+
proto.event.v1.StreamEventRequest.prototype.getSdkcall = function() {
|
|
1109
|
+
return /** @type{?proto.event.v1.SDKCall} */ (
|
|
1110
|
+
jspb.Message.getWrapperField(this, proto.event.v1.SDKCall, 4));
|
|
1111
|
+
};
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* @param {?proto.event.v1.SDKCall|undefined} value
|
|
1116
|
+
* @return {!proto.event.v1.StreamEventRequest} returns this
|
|
1117
|
+
*/
|
|
1118
|
+
proto.event.v1.StreamEventRequest.prototype.setSdkcall = function(value) {
|
|
1119
|
+
return jspb.Message.setOneofWrapperField(this, 4, proto.event.v1.StreamEventRequest.oneofGroups_[0], value);
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* Clears the message field making it undefined.
|
|
1125
|
+
* @return {!proto.event.v1.StreamEventRequest} returns this
|
|
1126
|
+
*/
|
|
1127
|
+
proto.event.v1.StreamEventRequest.prototype.clearSdkcall = function() {
|
|
1128
|
+
return this.setSdkcall(undefined);
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* Returns whether this field is set.
|
|
1134
|
+
* @return {boolean}
|
|
1135
|
+
*/
|
|
1136
|
+
proto.event.v1.StreamEventRequest.prototype.hasSdkcall = function() {
|
|
1137
|
+
return jspb.Message.getField(this, 4) != null;
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* optional AITokenUsage aiTokenUsage = 5;
|
|
1143
|
+
* @return {?proto.event.v1.AITokenUsage}
|
|
1144
|
+
*/
|
|
1145
|
+
proto.event.v1.StreamEventRequest.prototype.getAitokenusage = function() {
|
|
1146
|
+
return /** @type{?proto.event.v1.AITokenUsage} */ (
|
|
1147
|
+
jspb.Message.getWrapperField(this, proto.event.v1.AITokenUsage, 5));
|
|
1148
|
+
};
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* @param {?proto.event.v1.AITokenUsage|undefined} value
|
|
1153
|
+
* @return {!proto.event.v1.StreamEventRequest} returns this
|
|
1154
|
+
*/
|
|
1155
|
+
proto.event.v1.StreamEventRequest.prototype.setAitokenusage = function(value) {
|
|
1156
|
+
return jspb.Message.setOneofWrapperField(this, 5, proto.event.v1.StreamEventRequest.oneofGroups_[0], value);
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* Clears the message field making it undefined.
|
|
1162
|
+
* @return {!proto.event.v1.StreamEventRequest} returns this
|
|
1163
|
+
*/
|
|
1164
|
+
proto.event.v1.StreamEventRequest.prototype.clearAitokenusage = function() {
|
|
1165
|
+
return this.setAitokenusage(undefined);
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* Returns whether this field is set.
|
|
1171
|
+
* @return {boolean}
|
|
1172
|
+
*/
|
|
1173
|
+
proto.event.v1.StreamEventRequest.prototype.hasAitokenusage = function() {
|
|
1174
|
+
return jspb.Message.getField(this, 5) != null;
|
|
1175
|
+
};
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Oneof group definitions for this message. Each group defines the field
|
|
1181
|
+
* numbers belonging to that group. When of these fields' value is set, all
|
|
1182
|
+
* other fields in the group are cleared. During deserialization, if multiple
|
|
1183
|
+
* fields are encountered for a group, only the last value seen will be kept.
|
|
1184
|
+
* @private {!Array<!Array<number>>}
|
|
1185
|
+
* @const
|
|
1186
|
+
*/
|
|
1187
|
+
proto.event.v1.AITokenUsage.oneofGroups_ = [[4,5,8],[6,7,9]];
|
|
1188
|
+
|
|
1189
|
+
/**
|
|
1190
|
+
* @enum {number}
|
|
1191
|
+
*/
|
|
1192
|
+
proto.event.v1.AITokenUsage.InputdebitCase = {
|
|
1193
|
+
INPUTDEBIT_NOT_SET: 0,
|
|
1194
|
+
INPUTAMOUNT: 4,
|
|
1195
|
+
INPUTTAG: 5,
|
|
1196
|
+
INPUTEXPR: 8
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* @return {proto.event.v1.AITokenUsage.InputdebitCase}
|
|
1201
|
+
*/
|
|
1202
|
+
proto.event.v1.AITokenUsage.prototype.getInputdebitCase = function() {
|
|
1203
|
+
return /** @type {proto.event.v1.AITokenUsage.InputdebitCase} */(jspb.Message.computeOneofCase(this, proto.event.v1.AITokenUsage.oneofGroups_[0]));
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* @enum {number}
|
|
1208
|
+
*/
|
|
1209
|
+
proto.event.v1.AITokenUsage.OutputdebitCase = {
|
|
1210
|
+
OUTPUTDEBIT_NOT_SET: 0,
|
|
1211
|
+
OUTPUTAMOUNT: 6,
|
|
1212
|
+
OUTPUTTAG: 7,
|
|
1213
|
+
OUTPUTEXPR: 9
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* @return {proto.event.v1.AITokenUsage.OutputdebitCase}
|
|
1218
|
+
*/
|
|
1219
|
+
proto.event.v1.AITokenUsage.prototype.getOutputdebitCase = function() {
|
|
1220
|
+
return /** @type {proto.event.v1.AITokenUsage.OutputdebitCase} */(jspb.Message.computeOneofCase(this, proto.event.v1.AITokenUsage.oneofGroups_[1]));
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1226
|
+
/**
|
|
1227
|
+
* Creates an object representation of this proto.
|
|
1228
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1229
|
+
* Optional fields that are not set will be set to undefined.
|
|
1230
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1231
|
+
* For the list of reserved names please see:
|
|
1232
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
1233
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
1234
|
+
* JSPB instance for transitional soy proto support:
|
|
1235
|
+
* http://goto/soy-param-migration
|
|
1236
|
+
* @return {!Object}
|
|
1237
|
+
*/
|
|
1238
|
+
proto.event.v1.AITokenUsage.prototype.toObject = function(opt_includeInstance) {
|
|
1239
|
+
return proto.event.v1.AITokenUsage.toObject(opt_includeInstance, this);
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* Static version of the {@see toObject} method.
|
|
1245
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
1246
|
+
* the JSPB instance for transitional soy proto support:
|
|
1247
|
+
* http://goto/soy-param-migration
|
|
1248
|
+
* @param {!proto.event.v1.AITokenUsage} msg The msg instance to transform.
|
|
1249
|
+
* @return {!Object}
|
|
1250
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1251
|
+
*/
|
|
1252
|
+
proto.event.v1.AITokenUsage.toObject = function(includeInstance, msg) {
|
|
1253
|
+
var f, obj = {
|
|
1254
|
+
model: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
1255
|
+
inputtokens: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
1256
|
+
outputtokens: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
1257
|
+
inputamount: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
|
|
1258
|
+
inputtag: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
1259
|
+
inputexpr: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
|
1260
|
+
outputamount: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0),
|
|
1261
|
+
outputtag: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
|
1262
|
+
outputexpr: jspb.Message.getFieldWithDefault(msg, 9, "")
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
if (includeInstance) {
|
|
1266
|
+
obj.$jspbMessageInstance = msg;
|
|
1267
|
+
}
|
|
1268
|
+
return obj;
|
|
1269
|
+
};
|
|
117
1270
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1275
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1276
|
+
* @return {!proto.event.v1.AITokenUsage}
|
|
1277
|
+
*/
|
|
1278
|
+
proto.event.v1.AITokenUsage.deserializeBinary = function(bytes) {
|
|
1279
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1280
|
+
var msg = new proto.event.v1.AITokenUsage;
|
|
1281
|
+
return proto.event.v1.AITokenUsage.deserializeBinaryFromReader(msg, reader);
|
|
1282
|
+
};
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1287
|
+
* given reader into the given message object.
|
|
1288
|
+
* @param {!proto.event.v1.AITokenUsage} msg The message object to deserialize into.
|
|
1289
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1290
|
+
* @return {!proto.event.v1.AITokenUsage}
|
|
1291
|
+
*/
|
|
1292
|
+
proto.event.v1.AITokenUsage.deserializeBinaryFromReader = function(msg, reader) {
|
|
1293
|
+
while (reader.nextField()) {
|
|
1294
|
+
if (reader.isEndGroup()) {
|
|
1295
|
+
break;
|
|
138
1296
|
}
|
|
139
|
-
|
|
140
|
-
|
|
1297
|
+
var field = reader.getFieldNumber();
|
|
1298
|
+
switch (field) {
|
|
1299
|
+
case 1:
|
|
1300
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1301
|
+
msg.setModel(value);
|
|
1302
|
+
break;
|
|
1303
|
+
case 2:
|
|
1304
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
1305
|
+
msg.setInputtokens(value);
|
|
1306
|
+
break;
|
|
1307
|
+
case 3:
|
|
1308
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
1309
|
+
msg.setOutputtokens(value);
|
|
1310
|
+
break;
|
|
1311
|
+
case 4:
|
|
1312
|
+
var value = /** @type {number} */ (reader.readFloat());
|
|
1313
|
+
msg.setInputamount(value);
|
|
1314
|
+
break;
|
|
1315
|
+
case 5:
|
|
1316
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1317
|
+
msg.setInputtag(value);
|
|
1318
|
+
break;
|
|
1319
|
+
case 8:
|
|
1320
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1321
|
+
msg.setInputexpr(value);
|
|
1322
|
+
break;
|
|
1323
|
+
case 6:
|
|
1324
|
+
var value = /** @type {number} */ (reader.readFloat());
|
|
1325
|
+
msg.setOutputamount(value);
|
|
1326
|
+
break;
|
|
1327
|
+
case 7:
|
|
1328
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1329
|
+
msg.setOutputtag(value);
|
|
1330
|
+
break;
|
|
1331
|
+
case 9:
|
|
1332
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1333
|
+
msg.setOutputexpr(value);
|
|
1334
|
+
break;
|
|
1335
|
+
default:
|
|
1336
|
+
reader.skipField();
|
|
1337
|
+
break;
|
|
141
1338
|
}
|
|
142
|
-
|
|
143
|
-
|
|
1339
|
+
}
|
|
1340
|
+
return msg;
|
|
1341
|
+
};
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1346
|
+
* @return {!Uint8Array}
|
|
1347
|
+
*/
|
|
1348
|
+
proto.event.v1.AITokenUsage.prototype.serializeBinary = function() {
|
|
1349
|
+
var writer = new jspb.BinaryWriter();
|
|
1350
|
+
proto.event.v1.AITokenUsage.serializeBinaryToWriter(this, writer);
|
|
1351
|
+
return writer.getResultBuffer();
|
|
1352
|
+
};
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
1357
|
+
* format), writing to the given BinaryWriter.
|
|
1358
|
+
* @param {!proto.event.v1.AITokenUsage} message
|
|
1359
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1360
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1361
|
+
*/
|
|
1362
|
+
proto.event.v1.AITokenUsage.serializeBinaryToWriter = function(message, writer) {
|
|
1363
|
+
var f = undefined;
|
|
1364
|
+
f = message.getModel();
|
|
1365
|
+
if (f.length > 0) {
|
|
1366
|
+
writer.writeString(
|
|
1367
|
+
1,
|
|
1368
|
+
f
|
|
1369
|
+
);
|
|
1370
|
+
}
|
|
1371
|
+
f = message.getInputtokens();
|
|
1372
|
+
if (f !== 0) {
|
|
1373
|
+
writer.writeInt32(
|
|
1374
|
+
2,
|
|
1375
|
+
f
|
|
1376
|
+
);
|
|
1377
|
+
}
|
|
1378
|
+
f = message.getOutputtokens();
|
|
1379
|
+
if (f !== 0) {
|
|
1380
|
+
writer.writeInt32(
|
|
1381
|
+
3,
|
|
1382
|
+
f
|
|
1383
|
+
);
|
|
1384
|
+
}
|
|
1385
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 4));
|
|
1386
|
+
if (f != null) {
|
|
1387
|
+
writer.writeFloat(
|
|
1388
|
+
4,
|
|
1389
|
+
f
|
|
1390
|
+
);
|
|
1391
|
+
}
|
|
1392
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 5));
|
|
1393
|
+
if (f != null) {
|
|
1394
|
+
writer.writeString(
|
|
1395
|
+
5,
|
|
1396
|
+
f
|
|
1397
|
+
);
|
|
1398
|
+
}
|
|
1399
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 8));
|
|
1400
|
+
if (f != null) {
|
|
1401
|
+
writer.writeString(
|
|
1402
|
+
8,
|
|
1403
|
+
f
|
|
1404
|
+
);
|
|
1405
|
+
}
|
|
1406
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 6));
|
|
1407
|
+
if (f != null) {
|
|
1408
|
+
writer.writeFloat(
|
|
1409
|
+
6,
|
|
1410
|
+
f
|
|
1411
|
+
);
|
|
1412
|
+
}
|
|
1413
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 7));
|
|
1414
|
+
if (f != null) {
|
|
1415
|
+
writer.writeString(
|
|
1416
|
+
7,
|
|
1417
|
+
f
|
|
1418
|
+
);
|
|
1419
|
+
}
|
|
1420
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 9));
|
|
1421
|
+
if (f != null) {
|
|
1422
|
+
writer.writeString(
|
|
1423
|
+
9,
|
|
1424
|
+
f
|
|
1425
|
+
);
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* optional string model = 1;
|
|
1432
|
+
* @return {string}
|
|
1433
|
+
*/
|
|
1434
|
+
proto.event.v1.AITokenUsage.prototype.getModel = function() {
|
|
1435
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
1436
|
+
};
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
/**
|
|
1440
|
+
* @param {string} value
|
|
1441
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1442
|
+
*/
|
|
1443
|
+
proto.event.v1.AITokenUsage.prototype.setModel = function(value) {
|
|
1444
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
1445
|
+
};
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* optional int32 inputTokens = 2;
|
|
1450
|
+
* @return {number}
|
|
1451
|
+
*/
|
|
1452
|
+
proto.event.v1.AITokenUsage.prototype.getInputtokens = function() {
|
|
1453
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
1454
|
+
};
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* @param {number} value
|
|
1459
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1460
|
+
*/
|
|
1461
|
+
proto.event.v1.AITokenUsage.prototype.setInputtokens = function(value) {
|
|
1462
|
+
return jspb.Message.setProto3IntField(this, 2, value);
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* optional int32 outputTokens = 3;
|
|
1468
|
+
* @return {number}
|
|
1469
|
+
*/
|
|
1470
|
+
proto.event.v1.AITokenUsage.prototype.getOutputtokens = function() {
|
|
1471
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
1472
|
+
};
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* @param {number} value
|
|
1477
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1478
|
+
*/
|
|
1479
|
+
proto.event.v1.AITokenUsage.prototype.setOutputtokens = function(value) {
|
|
1480
|
+
return jspb.Message.setProto3IntField(this, 3, value);
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
/**
|
|
1485
|
+
* optional float inputAmount = 4;
|
|
1486
|
+
* @return {number}
|
|
1487
|
+
*/
|
|
1488
|
+
proto.event.v1.AITokenUsage.prototype.getInputamount = function() {
|
|
1489
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
|
|
1493
|
+
/**
|
|
1494
|
+
* @param {number} value
|
|
1495
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1496
|
+
*/
|
|
1497
|
+
proto.event.v1.AITokenUsage.prototype.setInputamount = function(value) {
|
|
1498
|
+
return jspb.Message.setOneofField(this, 4, proto.event.v1.AITokenUsage.oneofGroups_[0], value);
|
|
1499
|
+
};
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* Clears the field making it undefined.
|
|
1504
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1505
|
+
*/
|
|
1506
|
+
proto.event.v1.AITokenUsage.prototype.clearInputamount = function() {
|
|
1507
|
+
return jspb.Message.setOneofField(this, 4, proto.event.v1.AITokenUsage.oneofGroups_[0], undefined);
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* Returns whether this field is set.
|
|
1513
|
+
* @return {boolean}
|
|
1514
|
+
*/
|
|
1515
|
+
proto.event.v1.AITokenUsage.prototype.hasInputamount = function() {
|
|
1516
|
+
return jspb.Message.getField(this, 4) != null;
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
/**
|
|
1521
|
+
* optional string inputTag = 5;
|
|
1522
|
+
* @return {string}
|
|
1523
|
+
*/
|
|
1524
|
+
proto.event.v1.AITokenUsage.prototype.getInputtag = function() {
|
|
1525
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* @param {string} value
|
|
1531
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1532
|
+
*/
|
|
1533
|
+
proto.event.v1.AITokenUsage.prototype.setInputtag = function(value) {
|
|
1534
|
+
return jspb.Message.setOneofField(this, 5, proto.event.v1.AITokenUsage.oneofGroups_[0], value);
|
|
1535
|
+
};
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* Clears the field making it undefined.
|
|
1540
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1541
|
+
*/
|
|
1542
|
+
proto.event.v1.AITokenUsage.prototype.clearInputtag = function() {
|
|
1543
|
+
return jspb.Message.setOneofField(this, 5, proto.event.v1.AITokenUsage.oneofGroups_[0], undefined);
|
|
1544
|
+
};
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* Returns whether this field is set.
|
|
1549
|
+
* @return {boolean}
|
|
1550
|
+
*/
|
|
1551
|
+
proto.event.v1.AITokenUsage.prototype.hasInputtag = function() {
|
|
1552
|
+
return jspb.Message.getField(this, 5) != null;
|
|
1553
|
+
};
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
* optional string inputExpr = 8;
|
|
1558
|
+
* @return {string}
|
|
1559
|
+
*/
|
|
1560
|
+
proto.event.v1.AITokenUsage.prototype.getInputexpr = function() {
|
|
1561
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
|
|
1562
|
+
};
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* @param {string} value
|
|
1567
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1568
|
+
*/
|
|
1569
|
+
proto.event.v1.AITokenUsage.prototype.setInputexpr = function(value) {
|
|
1570
|
+
return jspb.Message.setOneofField(this, 8, proto.event.v1.AITokenUsage.oneofGroups_[0], value);
|
|
1571
|
+
};
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* Clears the field making it undefined.
|
|
1576
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1577
|
+
*/
|
|
1578
|
+
proto.event.v1.AITokenUsage.prototype.clearInputexpr = function() {
|
|
1579
|
+
return jspb.Message.setOneofField(this, 8, proto.event.v1.AITokenUsage.oneofGroups_[0], undefined);
|
|
1580
|
+
};
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
/**
|
|
1584
|
+
* Returns whether this field is set.
|
|
1585
|
+
* @return {boolean}
|
|
1586
|
+
*/
|
|
1587
|
+
proto.event.v1.AITokenUsage.prototype.hasInputexpr = function() {
|
|
1588
|
+
return jspb.Message.getField(this, 8) != null;
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* optional float outputAmount = 6;
|
|
1594
|
+
* @return {number}
|
|
1595
|
+
*/
|
|
1596
|
+
proto.event.v1.AITokenUsage.prototype.getOutputamount = function() {
|
|
1597
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0));
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* @param {number} value
|
|
1603
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1604
|
+
*/
|
|
1605
|
+
proto.event.v1.AITokenUsage.prototype.setOutputamount = function(value) {
|
|
1606
|
+
return jspb.Message.setOneofField(this, 6, proto.event.v1.AITokenUsage.oneofGroups_[1], value);
|
|
1607
|
+
};
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* Clears the field making it undefined.
|
|
1612
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1613
|
+
*/
|
|
1614
|
+
proto.event.v1.AITokenUsage.prototype.clearOutputamount = function() {
|
|
1615
|
+
return jspb.Message.setOneofField(this, 6, proto.event.v1.AITokenUsage.oneofGroups_[1], undefined);
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
/**
|
|
1620
|
+
* Returns whether this field is set.
|
|
1621
|
+
* @return {boolean}
|
|
1622
|
+
*/
|
|
1623
|
+
proto.event.v1.AITokenUsage.prototype.hasOutputamount = function() {
|
|
1624
|
+
return jspb.Message.getField(this, 6) != null;
|
|
1625
|
+
};
|
|
1626
|
+
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* optional string outputTag = 7;
|
|
1630
|
+
* @return {string}
|
|
1631
|
+
*/
|
|
1632
|
+
proto.event.v1.AITokenUsage.prototype.getOutputtag = function() {
|
|
1633
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
|
|
1634
|
+
};
|
|
1635
|
+
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
* @param {string} value
|
|
1639
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1640
|
+
*/
|
|
1641
|
+
proto.event.v1.AITokenUsage.prototype.setOutputtag = function(value) {
|
|
1642
|
+
return jspb.Message.setOneofField(this, 7, proto.event.v1.AITokenUsage.oneofGroups_[1], value);
|
|
1643
|
+
};
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
/**
|
|
1647
|
+
* Clears the field making it undefined.
|
|
1648
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1649
|
+
*/
|
|
1650
|
+
proto.event.v1.AITokenUsage.prototype.clearOutputtag = function() {
|
|
1651
|
+
return jspb.Message.setOneofField(this, 7, proto.event.v1.AITokenUsage.oneofGroups_[1], undefined);
|
|
1652
|
+
};
|
|
1653
|
+
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* Returns whether this field is set.
|
|
1657
|
+
* @return {boolean}
|
|
1658
|
+
*/
|
|
1659
|
+
proto.event.v1.AITokenUsage.prototype.hasOutputtag = function() {
|
|
1660
|
+
return jspb.Message.getField(this, 7) != null;
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
/**
|
|
1665
|
+
* optional string outputExpr = 9;
|
|
1666
|
+
* @return {string}
|
|
1667
|
+
*/
|
|
1668
|
+
proto.event.v1.AITokenUsage.prototype.getOutputexpr = function() {
|
|
1669
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
|
|
1670
|
+
};
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* @param {string} value
|
|
1675
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1676
|
+
*/
|
|
1677
|
+
proto.event.v1.AITokenUsage.prototype.setOutputexpr = function(value) {
|
|
1678
|
+
return jspb.Message.setOneofField(this, 9, proto.event.v1.AITokenUsage.oneofGroups_[1], value);
|
|
1679
|
+
};
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* Clears the field making it undefined.
|
|
1684
|
+
* @return {!proto.event.v1.AITokenUsage} returns this
|
|
1685
|
+
*/
|
|
1686
|
+
proto.event.v1.AITokenUsage.prototype.clearOutputexpr = function() {
|
|
1687
|
+
return jspb.Message.setOneofField(this, 9, proto.event.v1.AITokenUsage.oneofGroups_[1], undefined);
|
|
1688
|
+
};
|
|
1689
|
+
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* Returns whether this field is set.
|
|
1693
|
+
* @return {boolean}
|
|
1694
|
+
*/
|
|
1695
|
+
proto.event.v1.AITokenUsage.prototype.hasOutputexpr = function() {
|
|
1696
|
+
return jspb.Message.getField(this, 9) != null;
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1704
|
+
/**
|
|
1705
|
+
* Creates an object representation of this proto.
|
|
1706
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1707
|
+
* Optional fields that are not set will be set to undefined.
|
|
1708
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1709
|
+
* For the list of reserved names please see:
|
|
1710
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
1711
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
1712
|
+
* JSPB instance for transitional soy proto support:
|
|
1713
|
+
* http://goto/soy-param-migration
|
|
1714
|
+
* @return {!Object}
|
|
1715
|
+
*/
|
|
1716
|
+
proto.event.v1.StreamEventResponse.prototype.toObject = function(opt_includeInstance) {
|
|
1717
|
+
return proto.event.v1.StreamEventResponse.toObject(opt_includeInstance, this);
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
/**
|
|
1722
|
+
* Static version of the {@see toObject} method.
|
|
1723
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
1724
|
+
* the JSPB instance for transitional soy proto support:
|
|
1725
|
+
* http://goto/soy-param-migration
|
|
1726
|
+
* @param {!proto.event.v1.StreamEventResponse} msg The msg instance to transform.
|
|
1727
|
+
* @return {!Object}
|
|
1728
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1729
|
+
*/
|
|
1730
|
+
proto.event.v1.StreamEventResponse.toObject = function(includeInstance, msg) {
|
|
1731
|
+
var f, obj = {
|
|
1732
|
+
eventsprocessed: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
1733
|
+
message: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
1734
|
+
};
|
|
1735
|
+
|
|
1736
|
+
if (includeInstance) {
|
|
1737
|
+
obj.$jspbMessageInstance = msg;
|
|
1738
|
+
}
|
|
1739
|
+
return obj;
|
|
1740
|
+
};
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1746
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1747
|
+
* @return {!proto.event.v1.StreamEventResponse}
|
|
1748
|
+
*/
|
|
1749
|
+
proto.event.v1.StreamEventResponse.deserializeBinary = function(bytes) {
|
|
1750
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1751
|
+
var msg = new proto.event.v1.StreamEventResponse;
|
|
1752
|
+
return proto.event.v1.StreamEventResponse.deserializeBinaryFromReader(msg, reader);
|
|
1753
|
+
};
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1758
|
+
* given reader into the given message object.
|
|
1759
|
+
* @param {!proto.event.v1.StreamEventResponse} msg The message object to deserialize into.
|
|
1760
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1761
|
+
* @return {!proto.event.v1.StreamEventResponse}
|
|
1762
|
+
*/
|
|
1763
|
+
proto.event.v1.StreamEventResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
1764
|
+
while (reader.nextField()) {
|
|
1765
|
+
if (reader.isEndGroup()) {
|
|
1766
|
+
break;
|
|
144
1767
|
}
|
|
145
|
-
|
|
146
|
-
|
|
1768
|
+
var field = reader.getFieldNumber();
|
|
1769
|
+
switch (field) {
|
|
1770
|
+
case 1:
|
|
1771
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
1772
|
+
msg.setEventsprocessed(value);
|
|
1773
|
+
break;
|
|
1774
|
+
case 2:
|
|
1775
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1776
|
+
msg.setMessage(value);
|
|
1777
|
+
break;
|
|
1778
|
+
default:
|
|
1779
|
+
reader.skipField();
|
|
1780
|
+
break;
|
|
147
1781
|
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
1782
|
+
}
|
|
1783
|
+
return msg;
|
|
1784
|
+
};
|
|
1785
|
+
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1789
|
+
* @return {!Uint8Array}
|
|
1790
|
+
*/
|
|
1791
|
+
proto.event.v1.StreamEventResponse.prototype.serializeBinary = function() {
|
|
1792
|
+
var writer = new jspb.BinaryWriter();
|
|
1793
|
+
proto.event.v1.StreamEventResponse.serializeBinaryToWriter(this, writer);
|
|
1794
|
+
return writer.getResultBuffer();
|
|
1795
|
+
};
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
1800
|
+
* format), writing to the given BinaryWriter.
|
|
1801
|
+
* @param {!proto.event.v1.StreamEventResponse} message
|
|
1802
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1803
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1804
|
+
*/
|
|
1805
|
+
proto.event.v1.StreamEventResponse.serializeBinaryToWriter = function(message, writer) {
|
|
1806
|
+
var f = undefined;
|
|
1807
|
+
f = message.getEventsprocessed();
|
|
1808
|
+
if (f !== 0) {
|
|
1809
|
+
writer.writeInt32(
|
|
1810
|
+
1,
|
|
1811
|
+
f
|
|
1812
|
+
);
|
|
1813
|
+
}
|
|
1814
|
+
f = message.getMessage();
|
|
1815
|
+
if (f.length > 0) {
|
|
1816
|
+
writer.writeString(
|
|
1817
|
+
2,
|
|
1818
|
+
f
|
|
1819
|
+
);
|
|
1820
|
+
}
|
|
1821
|
+
};
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* optional int32 eventsProcessed = 1;
|
|
1826
|
+
* @return {number}
|
|
1827
|
+
*/
|
|
1828
|
+
proto.event.v1.StreamEventResponse.prototype.getEventsprocessed = function() {
|
|
1829
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
1830
|
+
};
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
/**
|
|
1834
|
+
* @param {number} value
|
|
1835
|
+
* @return {!proto.event.v1.StreamEventResponse} returns this
|
|
1836
|
+
*/
|
|
1837
|
+
proto.event.v1.StreamEventResponse.prototype.setEventsprocessed = function(value) {
|
|
1838
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
1839
|
+
};
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* optional string message = 2;
|
|
1844
|
+
* @return {string}
|
|
1845
|
+
*/
|
|
1846
|
+
proto.event.v1.StreamEventResponse.prototype.getMessage = function() {
|
|
1847
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
1848
|
+
};
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* @param {string} value
|
|
1853
|
+
* @return {!proto.event.v1.StreamEventResponse} returns this
|
|
1854
|
+
*/
|
|
1855
|
+
proto.event.v1.StreamEventResponse.prototype.setMessage = function(value) {
|
|
1856
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
/**
|
|
1861
|
+
* @enum {number}
|
|
1862
|
+
*/
|
|
1863
|
+
proto.event.v1.EventType = {
|
|
1864
|
+
EVENT_TYPE_UNSPECIFIED: 0,
|
|
1865
|
+
SDK_CALL: 1,
|
|
1866
|
+
AI_TOKEN_USAGE: 2
|
|
1867
|
+
};
|
|
1868
|
+
|
|
1869
|
+
/**
|
|
1870
|
+
* @enum {number}
|
|
1871
|
+
*/
|
|
1872
|
+
proto.event.v1.SDKCallType = {
|
|
1873
|
+
SDKCALLTYPE_UNSPECIFIED: 0,
|
|
1874
|
+
RAW: 1,
|
|
1875
|
+
MIDDLEWARE_CALL: 2
|
|
1876
|
+
};
|
|
1877
|
+
|
|
1878
|
+
goog.object.extend(exports, proto.event.v1);
|