clarifai-web-grpc 9.6.1 → 9.10.5

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.
Files changed (79) hide show
  1. package/.github/workflows/ci.yml +25 -17
  2. package/README.md +1 -1
  3. package/VERSION +1 -1
  4. package/dist/cjs/google/api/annotations_pb.d.ts +1 -0
  5. package/dist/cjs/google/api/annotations_pb.js +32 -0
  6. package/dist/cjs/google/api/http_pb.d.ts +1 -0
  7. package/dist/cjs/google/api/http_pb.js +813 -0
  8. package/dist/cjs/index.d.ts +7 -0
  9. package/dist/cjs/index.js +2 -1
  10. package/dist/cjs/proto/clarifai/api/resources_pb.d.ts +1 -0
  11. package/dist/cjs/proto/clarifai/api/resources_pb.js +51218 -0
  12. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.d.ts +5 -0
  13. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.js +9103 -0
  14. package/dist/cjs/proto/clarifai/api/service_pb.d.ts +1 -0
  15. package/dist/cjs/proto/clarifai/api/service_pb.js +67552 -0
  16. package/dist/cjs/proto/clarifai/api/status/status_code_pb.d.ts +1 -0
  17. package/dist/cjs/proto/clarifai/api/status/status_code_pb.js +376 -0
  18. package/dist/cjs/proto/clarifai/api/status/status_pb.d.ts +1 -0
  19. package/dist/cjs/proto/clarifai/api/status/status_pb.js +717 -0
  20. package/dist/cjs/proto/clarifai/api/utils/extensions_pb.d.ts +1 -0
  21. package/dist/cjs/proto/clarifai/api/utils/extensions_pb.js +60 -0
  22. package/dist/cjs/proto/clarifai/api/utils/matrix_pb.d.ts +1 -0
  23. package/dist/cjs/proto/clarifai/api/utils/matrix_pb.js +197 -0
  24. package/dist/cjs/proto/clarifai/api/utils/test_proto_pb.d.ts +1 -0
  25. package/dist/cjs/proto/clarifai/api/utils/test_proto_pb.js +529 -0
  26. package/dist/cjs/proto/clarifai/auth/scope/scope_pb.d.ts +1 -0
  27. package/dist/cjs/proto/clarifai/auth/scope/scope_pb.js +332 -0
  28. package/dist/cjs/proto/clarifai/auth/types/types_pb.d.ts +1 -0
  29. package/dist/cjs/proto/clarifai/auth/types/types_pb.js +34 -0
  30. package/dist/cjs/proto/clarifai/auth/util/extension_pb.d.ts +1 -0
  31. package/dist/cjs/proto/clarifai/auth/util/extension_pb.js +88 -0
  32. package/dist/cjs/resources.d.ts +1 -0
  33. package/dist/cjs/resources.js +13 -0
  34. package/dist/cjs/service.d.ts +1 -0
  35. package/dist/cjs/service.js +13 -0
  36. package/dist/esm/google/api/annotations_pb.d.ts +1 -0
  37. package/dist/esm/google/api/annotations_pb.js +32 -0
  38. package/dist/esm/google/api/http_pb.d.ts +1 -0
  39. package/dist/esm/google/api/http_pb.js +813 -0
  40. package/dist/esm/index.d.ts +7 -0
  41. package/dist/esm/index.js +10 -0
  42. package/dist/esm/proto/clarifai/api/resources_pb.d.ts +1 -0
  43. package/dist/esm/proto/clarifai/api/resources_pb.js +51218 -0
  44. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.d.ts +5 -0
  45. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.js +9103 -0
  46. package/dist/esm/proto/clarifai/api/service_pb.d.ts +1 -0
  47. package/dist/esm/proto/clarifai/api/service_pb.js +67552 -0
  48. package/dist/esm/proto/clarifai/api/status/status_code_pb.d.ts +1 -0
  49. package/dist/esm/proto/clarifai/api/status/status_code_pb.js +376 -0
  50. package/dist/esm/proto/clarifai/api/status/status_pb.d.ts +1 -0
  51. package/dist/esm/proto/clarifai/api/status/status_pb.js +717 -0
  52. package/dist/esm/proto/clarifai/api/utils/extensions_pb.d.ts +1 -0
  53. package/dist/esm/proto/clarifai/api/utils/extensions_pb.js +60 -0
  54. package/dist/esm/proto/clarifai/api/utils/matrix_pb.d.ts +1 -0
  55. package/dist/esm/proto/clarifai/api/utils/matrix_pb.js +197 -0
  56. package/dist/esm/proto/clarifai/api/utils/test_proto_pb.d.ts +1 -0
  57. package/dist/esm/proto/clarifai/api/utils/test_proto_pb.js +529 -0
  58. package/dist/esm/proto/clarifai/auth/scope/scope_pb.d.ts +1 -0
  59. package/dist/esm/proto/clarifai/auth/scope/scope_pb.js +332 -0
  60. package/dist/esm/proto/clarifai/auth/types/types_pb.d.ts +1 -0
  61. package/dist/esm/proto/clarifai/auth/types/types_pb.js +34 -0
  62. package/dist/esm/proto/clarifai/auth/util/extension_pb.d.ts +1 -0
  63. package/dist/esm/proto/clarifai/auth/util/extension_pb.js +88 -0
  64. package/dist/esm/resources.d.ts +1 -0
  65. package/dist/esm/resources.js +1 -0
  66. package/dist/esm/service.d.ts +1 -0
  67. package/dist/esm/service.js +1 -0
  68. package/index.ts +2 -1
  69. package/package.json +1 -1
  70. package/proto/clarifai/api/resources_pb.d.ts +359 -27
  71. package/proto/clarifai/api/resources_pb.js +2892 -232
  72. package/proto/clarifai/api/service_grpc_web_pb.d.ts +96 -0
  73. package/proto/clarifai/api/service_grpc_web_pb.js +488 -0
  74. package/proto/clarifai/api/service_pb.d.ts +770 -50
  75. package/proto/clarifai/api/service_pb.js +29397 -23205
  76. package/proto/clarifai/api/status/status_code_pb.d.ts +7 -1
  77. package/proto/clarifai/api/status/status_code_pb.js +7 -1
  78. package/proto/clarifai/auth/scope/scope_pb.d.ts +5 -0
  79. package/proto/clarifai/auth/scope/scope_pb.js +6 -1
@@ -0,0 +1,529 @@
1
+ "use strict";
2
+ // source: proto/clarifai/api/utils/test_proto.proto
3
+ /**
4
+ * @fileoverview
5
+ * @enhanceable
6
+ * @suppress {missingRequire} reports error on implicit type usages.
7
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
8
+ * field starts with 'MSG_' and isn't a translatable message.
9
+ * @public
10
+ */
11
+ // GENERATED CODE -- DO NOT EDIT!
12
+ /* eslint-disable */
13
+ // @ts-nocheck
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (typeof globalThis !== 'undefined' && globalThis) ||
17
+ (typeof window !== 'undefined' && window) ||
18
+ (typeof global !== 'undefined' && global) ||
19
+ (typeof self !== 'undefined' && self) ||
20
+ (function () { return this; }).call(null) ||
21
+ Function('return this')();
22
+ var proto_clarifai_api_utils_extensions_pb = require('../../../../proto/clarifai/api/utils/extensions_pb.js');
23
+ goog.object.extend(proto, proto_clarifai_api_utils_extensions_pb);
24
+ goog.exportSymbol('proto.clarifai.api.utils.TestProto', null, global);
25
+ goog.exportSymbol('proto.clarifai.api.utils.TestProto.OneOfFieldCase', null, global);
26
+ goog.exportSymbol('proto.clarifai.api.utils.TestProto2', null, global);
27
+ /**
28
+ * Generated by JsPbCodeGenerator.
29
+ * @param {Array=} opt_data Optional initial data array, typically from a
30
+ * server response, or constructed directly in Javascript. The array is used
31
+ * in place and becomes part of the constructed object. It is not cloned.
32
+ * If no data is provided, the constructed object will be empty, but still
33
+ * valid.
34
+ * @extends {jspb.Message}
35
+ * @constructor
36
+ */
37
+ proto.clarifai.api.utils.TestProto = function (opt_data) {
38
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.clarifai.api.utils.TestProto.oneofGroups_);
39
+ };
40
+ goog.inherits(proto.clarifai.api.utils.TestProto, jspb.Message);
41
+ if (goog.DEBUG && !COMPILED) {
42
+ /**
43
+ * @public
44
+ * @override
45
+ */
46
+ proto.clarifai.api.utils.TestProto.displayName = 'proto.clarifai.api.utils.TestProto';
47
+ }
48
+ /**
49
+ * Generated by JsPbCodeGenerator.
50
+ * @param {Array=} opt_data Optional initial data array, typically from a
51
+ * server response, or constructed directly in Javascript. The array is used
52
+ * in place and becomes part of the constructed object. It is not cloned.
53
+ * If no data is provided, the constructed object will be empty, but still
54
+ * valid.
55
+ * @extends {jspb.Message}
56
+ * @constructor
57
+ */
58
+ proto.clarifai.api.utils.TestProto2 = function (opt_data) {
59
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
60
+ };
61
+ goog.inherits(proto.clarifai.api.utils.TestProto2, jspb.Message);
62
+ if (goog.DEBUG && !COMPILED) {
63
+ /**
64
+ * @public
65
+ * @override
66
+ */
67
+ proto.clarifai.api.utils.TestProto2.displayName = 'proto.clarifai.api.utils.TestProto2';
68
+ }
69
+ /**
70
+ * Oneof group definitions for this message. Each group defines the field
71
+ * numbers belonging to that group. When of these fields' value is set, all
72
+ * other fields in the group are cleared. During deserialization, if multiple
73
+ * fields are encountered for a group, only the last value seen will be kept.
74
+ * @private {!Array<!Array<number>>}
75
+ * @const
76
+ */
77
+ proto.clarifai.api.utils.TestProto.oneofGroups_ = [[5, 6, 7]];
78
+ /**
79
+ * @enum {number}
80
+ */
81
+ proto.clarifai.api.utils.TestProto.OneOfFieldCase = {
82
+ ONE_OF_FIELD_NOT_SET: 0,
83
+ STRING_ONEOF: 5,
84
+ BOOL_ONEOF: 6,
85
+ MESSAGE_ONEOF: 7
86
+ };
87
+ /**
88
+ * @return {proto.clarifai.api.utils.TestProto.OneOfFieldCase}
89
+ */
90
+ proto.clarifai.api.utils.TestProto.prototype.getOneOfFieldCase = function () {
91
+ return /** @type {proto.clarifai.api.utils.TestProto.OneOfFieldCase} */ (jspb.Message.computeOneofCase(this, proto.clarifai.api.utils.TestProto.oneofGroups_[0]));
92
+ };
93
+ if (jspb.Message.GENERATE_TO_OBJECT) {
94
+ /**
95
+ * Creates an object representation of this proto.
96
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
97
+ * Optional fields that are not set will be set to undefined.
98
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
99
+ * For the list of reserved names please see:
100
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
101
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
102
+ * JSPB instance for transitional soy proto support:
103
+ * http://goto/soy-param-migration
104
+ * @return {!Object}
105
+ */
106
+ proto.clarifai.api.utils.TestProto.prototype.toObject = function (opt_includeInstance) {
107
+ return proto.clarifai.api.utils.TestProto.toObject(opt_includeInstance, this);
108
+ };
109
+ /**
110
+ * Static version of the {@see toObject} method.
111
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
112
+ * the JSPB instance for transitional soy proto support:
113
+ * http://goto/soy-param-migration
114
+ * @param {!proto.clarifai.api.utils.TestProto} msg The msg instance to transform.
115
+ * @return {!Object}
116
+ * @suppress {unusedLocalVariables} f is only used for nested messages
117
+ */
118
+ proto.clarifai.api.utils.TestProto.toObject = function (includeInstance, msg) {
119
+ var f, obj = {
120
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
121
+ message: jspb.Message.getFieldWithDefault(msg, 2, ""),
122
+ value: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
123
+ imageBytes: msg.getImageBytes_asB64(),
124
+ stringOneof: jspb.Message.getFieldWithDefault(msg, 5, ""),
125
+ boolOneof: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
126
+ messageOneof: (f = msg.getMessageOneof()) && proto.clarifai.api.utils.TestProto2.toObject(includeInstance, f)
127
+ };
128
+ if (includeInstance) {
129
+ obj.$jspbMessageInstance = msg;
130
+ }
131
+ return obj;
132
+ };
133
+ }
134
+ /**
135
+ * Deserializes binary data (in protobuf wire format).
136
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
137
+ * @return {!proto.clarifai.api.utils.TestProto}
138
+ */
139
+ proto.clarifai.api.utils.TestProto.deserializeBinary = function (bytes) {
140
+ var reader = new jspb.BinaryReader(bytes);
141
+ var msg = new proto.clarifai.api.utils.TestProto;
142
+ return proto.clarifai.api.utils.TestProto.deserializeBinaryFromReader(msg, reader);
143
+ };
144
+ /**
145
+ * Deserializes binary data (in protobuf wire format) from the
146
+ * given reader into the given message object.
147
+ * @param {!proto.clarifai.api.utils.TestProto} msg The message object to deserialize into.
148
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
149
+ * @return {!proto.clarifai.api.utils.TestProto}
150
+ */
151
+ proto.clarifai.api.utils.TestProto.deserializeBinaryFromReader = function (msg, reader) {
152
+ while (reader.nextField()) {
153
+ if (reader.isEndGroup()) {
154
+ break;
155
+ }
156
+ var field = reader.getFieldNumber();
157
+ switch (field) {
158
+ case 1:
159
+ var value = /** @type {string} */ (reader.readString());
160
+ msg.setId(value);
161
+ break;
162
+ case 2:
163
+ var value = /** @type {string} */ (reader.readString());
164
+ msg.setMessage(value);
165
+ break;
166
+ case 3:
167
+ var value = /** @type {number} */ (reader.readDouble());
168
+ msg.setValue(value);
169
+ break;
170
+ case 4:
171
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
172
+ msg.setImageBytes(value);
173
+ break;
174
+ case 5:
175
+ var value = /** @type {string} */ (reader.readString());
176
+ msg.setStringOneof(value);
177
+ break;
178
+ case 6:
179
+ var value = /** @type {boolean} */ (reader.readBool());
180
+ msg.setBoolOneof(value);
181
+ break;
182
+ case 7:
183
+ var value = new proto.clarifai.api.utils.TestProto2;
184
+ reader.readMessage(value, proto.clarifai.api.utils.TestProto2.deserializeBinaryFromReader);
185
+ msg.setMessageOneof(value);
186
+ break;
187
+ default:
188
+ reader.skipField();
189
+ break;
190
+ }
191
+ }
192
+ return msg;
193
+ };
194
+ /**
195
+ * Serializes the message to binary data (in protobuf wire format).
196
+ * @return {!Uint8Array}
197
+ */
198
+ proto.clarifai.api.utils.TestProto.prototype.serializeBinary = function () {
199
+ var writer = new jspb.BinaryWriter();
200
+ proto.clarifai.api.utils.TestProto.serializeBinaryToWriter(this, writer);
201
+ return writer.getResultBuffer();
202
+ };
203
+ /**
204
+ * Serializes the given message to binary data (in protobuf wire
205
+ * format), writing to the given BinaryWriter.
206
+ * @param {!proto.clarifai.api.utils.TestProto} message
207
+ * @param {!jspb.BinaryWriter} writer
208
+ * @suppress {unusedLocalVariables} f is only used for nested messages
209
+ */
210
+ proto.clarifai.api.utils.TestProto.serializeBinaryToWriter = function (message, writer) {
211
+ var f = undefined;
212
+ f = message.getId();
213
+ if (f.length > 0) {
214
+ writer.writeString(1, f);
215
+ }
216
+ f = message.getMessage();
217
+ if (f.length > 0) {
218
+ writer.writeString(2, f);
219
+ }
220
+ f = message.getValue();
221
+ if (f !== 0.0) {
222
+ writer.writeDouble(3, f);
223
+ }
224
+ f = message.getImageBytes_asU8();
225
+ if (f.length > 0) {
226
+ writer.writeBytes(4, f);
227
+ }
228
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
229
+ if (f != null) {
230
+ writer.writeString(5, f);
231
+ }
232
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 6));
233
+ if (f != null) {
234
+ writer.writeBool(6, f);
235
+ }
236
+ f = message.getMessageOneof();
237
+ if (f != null) {
238
+ writer.writeMessage(7, f, proto.clarifai.api.utils.TestProto2.serializeBinaryToWriter);
239
+ }
240
+ };
241
+ /**
242
+ * optional string id = 1;
243
+ * @return {string}
244
+ */
245
+ proto.clarifai.api.utils.TestProto.prototype.getId = function () {
246
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
247
+ };
248
+ /**
249
+ * @param {string} value
250
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
251
+ */
252
+ proto.clarifai.api.utils.TestProto.prototype.setId = function (value) {
253
+ return jspb.Message.setProto3StringField(this, 1, value);
254
+ };
255
+ /**
256
+ * optional string message = 2;
257
+ * @return {string}
258
+ */
259
+ proto.clarifai.api.utils.TestProto.prototype.getMessage = function () {
260
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
261
+ };
262
+ /**
263
+ * @param {string} value
264
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
265
+ */
266
+ proto.clarifai.api.utils.TestProto.prototype.setMessage = function (value) {
267
+ return jspb.Message.setProto3StringField(this, 2, value);
268
+ };
269
+ /**
270
+ * optional double value = 3;
271
+ * @return {number}
272
+ */
273
+ proto.clarifai.api.utils.TestProto.prototype.getValue = function () {
274
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
275
+ };
276
+ /**
277
+ * @param {number} value
278
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
279
+ */
280
+ proto.clarifai.api.utils.TestProto.prototype.setValue = function (value) {
281
+ return jspb.Message.setProto3FloatField(this, 3, value);
282
+ };
283
+ /**
284
+ * optional bytes image_bytes = 4;
285
+ * @return {string}
286
+ */
287
+ proto.clarifai.api.utils.TestProto.prototype.getImageBytes = function () {
288
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
289
+ };
290
+ /**
291
+ * optional bytes image_bytes = 4;
292
+ * This is a type-conversion wrapper around `getImageBytes()`
293
+ * @return {string}
294
+ */
295
+ proto.clarifai.api.utils.TestProto.prototype.getImageBytes_asB64 = function () {
296
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getImageBytes()));
297
+ };
298
+ /**
299
+ * optional bytes image_bytes = 4;
300
+ * Note that Uint8Array is not supported on all browsers.
301
+ * @see http://caniuse.com/Uint8Array
302
+ * This is a type-conversion wrapper around `getImageBytes()`
303
+ * @return {!Uint8Array}
304
+ */
305
+ proto.clarifai.api.utils.TestProto.prototype.getImageBytes_asU8 = function () {
306
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getImageBytes()));
307
+ };
308
+ /**
309
+ * @param {!(string|Uint8Array)} value
310
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
311
+ */
312
+ proto.clarifai.api.utils.TestProto.prototype.setImageBytes = function (value) {
313
+ return jspb.Message.setProto3BytesField(this, 4, value);
314
+ };
315
+ /**
316
+ * optional string string_oneof = 5;
317
+ * @return {string}
318
+ */
319
+ proto.clarifai.api.utils.TestProto.prototype.getStringOneof = function () {
320
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
321
+ };
322
+ /**
323
+ * @param {string} value
324
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
325
+ */
326
+ proto.clarifai.api.utils.TestProto.prototype.setStringOneof = function (value) {
327
+ return jspb.Message.setOneofField(this, 5, proto.clarifai.api.utils.TestProto.oneofGroups_[0], value);
328
+ };
329
+ /**
330
+ * Clears the field making it undefined.
331
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
332
+ */
333
+ proto.clarifai.api.utils.TestProto.prototype.clearStringOneof = function () {
334
+ return jspb.Message.setOneofField(this, 5, proto.clarifai.api.utils.TestProto.oneofGroups_[0], undefined);
335
+ };
336
+ /**
337
+ * Returns whether this field is set.
338
+ * @return {boolean}
339
+ */
340
+ proto.clarifai.api.utils.TestProto.prototype.hasStringOneof = function () {
341
+ return jspb.Message.getField(this, 5) != null;
342
+ };
343
+ /**
344
+ * optional bool bool_oneof = 6;
345
+ * @return {boolean}
346
+ */
347
+ proto.clarifai.api.utils.TestProto.prototype.getBoolOneof = function () {
348
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
349
+ };
350
+ /**
351
+ * @param {boolean} value
352
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
353
+ */
354
+ proto.clarifai.api.utils.TestProto.prototype.setBoolOneof = function (value) {
355
+ return jspb.Message.setOneofField(this, 6, proto.clarifai.api.utils.TestProto.oneofGroups_[0], value);
356
+ };
357
+ /**
358
+ * Clears the field making it undefined.
359
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
360
+ */
361
+ proto.clarifai.api.utils.TestProto.prototype.clearBoolOneof = function () {
362
+ return jspb.Message.setOneofField(this, 6, proto.clarifai.api.utils.TestProto.oneofGroups_[0], undefined);
363
+ };
364
+ /**
365
+ * Returns whether this field is set.
366
+ * @return {boolean}
367
+ */
368
+ proto.clarifai.api.utils.TestProto.prototype.hasBoolOneof = function () {
369
+ return jspb.Message.getField(this, 6) != null;
370
+ };
371
+ /**
372
+ * optional TestProto2 message_oneof = 7;
373
+ * @return {?proto.clarifai.api.utils.TestProto2}
374
+ */
375
+ proto.clarifai.api.utils.TestProto.prototype.getMessageOneof = function () {
376
+ return /** @type{?proto.clarifai.api.utils.TestProto2} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.utils.TestProto2, 7));
377
+ };
378
+ /**
379
+ * @param {?proto.clarifai.api.utils.TestProto2|undefined} value
380
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
381
+ */
382
+ proto.clarifai.api.utils.TestProto.prototype.setMessageOneof = function (value) {
383
+ return jspb.Message.setOneofWrapperField(this, 7, proto.clarifai.api.utils.TestProto.oneofGroups_[0], value);
384
+ };
385
+ /**
386
+ * Clears the message field making it undefined.
387
+ * @return {!proto.clarifai.api.utils.TestProto} returns this
388
+ */
389
+ proto.clarifai.api.utils.TestProto.prototype.clearMessageOneof = function () {
390
+ return this.setMessageOneof(undefined);
391
+ };
392
+ /**
393
+ * Returns whether this field is set.
394
+ * @return {boolean}
395
+ */
396
+ proto.clarifai.api.utils.TestProto.prototype.hasMessageOneof = function () {
397
+ return jspb.Message.getField(this, 7) != null;
398
+ };
399
+ if (jspb.Message.GENERATE_TO_OBJECT) {
400
+ /**
401
+ * Creates an object representation of this proto.
402
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
403
+ * Optional fields that are not set will be set to undefined.
404
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
405
+ * For the list of reserved names please see:
406
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
407
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
408
+ * JSPB instance for transitional soy proto support:
409
+ * http://goto/soy-param-migration
410
+ * @return {!Object}
411
+ */
412
+ proto.clarifai.api.utils.TestProto2.prototype.toObject = function (opt_includeInstance) {
413
+ return proto.clarifai.api.utils.TestProto2.toObject(opt_includeInstance, this);
414
+ };
415
+ /**
416
+ * Static version of the {@see toObject} method.
417
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
418
+ * the JSPB instance for transitional soy proto support:
419
+ * http://goto/soy-param-migration
420
+ * @param {!proto.clarifai.api.utils.TestProto2} msg The msg instance to transform.
421
+ * @return {!Object}
422
+ * @suppress {unusedLocalVariables} f is only used for nested messages
423
+ */
424
+ proto.clarifai.api.utils.TestProto2.toObject = function (includeInstance, msg) {
425
+ var f, obj = {
426
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
427
+ flip: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
428
+ };
429
+ if (includeInstance) {
430
+ obj.$jspbMessageInstance = msg;
431
+ }
432
+ return obj;
433
+ };
434
+ }
435
+ /**
436
+ * Deserializes binary data (in protobuf wire format).
437
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
438
+ * @return {!proto.clarifai.api.utils.TestProto2}
439
+ */
440
+ proto.clarifai.api.utils.TestProto2.deserializeBinary = function (bytes) {
441
+ var reader = new jspb.BinaryReader(bytes);
442
+ var msg = new proto.clarifai.api.utils.TestProto2;
443
+ return proto.clarifai.api.utils.TestProto2.deserializeBinaryFromReader(msg, reader);
444
+ };
445
+ /**
446
+ * Deserializes binary data (in protobuf wire format) from the
447
+ * given reader into the given message object.
448
+ * @param {!proto.clarifai.api.utils.TestProto2} msg The message object to deserialize into.
449
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
450
+ * @return {!proto.clarifai.api.utils.TestProto2}
451
+ */
452
+ proto.clarifai.api.utils.TestProto2.deserializeBinaryFromReader = function (msg, reader) {
453
+ while (reader.nextField()) {
454
+ if (reader.isEndGroup()) {
455
+ break;
456
+ }
457
+ var field = reader.getFieldNumber();
458
+ switch (field) {
459
+ case 1:
460
+ var value = /** @type {string} */ (reader.readString());
461
+ msg.setId(value);
462
+ break;
463
+ case 2:
464
+ var value = /** @type {boolean} */ (reader.readBool());
465
+ msg.setFlip(value);
466
+ break;
467
+ default:
468
+ reader.skipField();
469
+ break;
470
+ }
471
+ }
472
+ return msg;
473
+ };
474
+ /**
475
+ * Serializes the message to binary data (in protobuf wire format).
476
+ * @return {!Uint8Array}
477
+ */
478
+ proto.clarifai.api.utils.TestProto2.prototype.serializeBinary = function () {
479
+ var writer = new jspb.BinaryWriter();
480
+ proto.clarifai.api.utils.TestProto2.serializeBinaryToWriter(this, writer);
481
+ return writer.getResultBuffer();
482
+ };
483
+ /**
484
+ * Serializes the given message to binary data (in protobuf wire
485
+ * format), writing to the given BinaryWriter.
486
+ * @param {!proto.clarifai.api.utils.TestProto2} message
487
+ * @param {!jspb.BinaryWriter} writer
488
+ * @suppress {unusedLocalVariables} f is only used for nested messages
489
+ */
490
+ proto.clarifai.api.utils.TestProto2.serializeBinaryToWriter = function (message, writer) {
491
+ var f = undefined;
492
+ f = message.getId();
493
+ if (f.length > 0) {
494
+ writer.writeString(1, f);
495
+ }
496
+ f = message.getFlip();
497
+ if (f) {
498
+ writer.writeBool(2, f);
499
+ }
500
+ };
501
+ /**
502
+ * optional string id = 1;
503
+ * @return {string}
504
+ */
505
+ proto.clarifai.api.utils.TestProto2.prototype.getId = function () {
506
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
507
+ };
508
+ /**
509
+ * @param {string} value
510
+ * @return {!proto.clarifai.api.utils.TestProto2} returns this
511
+ */
512
+ proto.clarifai.api.utils.TestProto2.prototype.setId = function (value) {
513
+ return jspb.Message.setProto3StringField(this, 1, value);
514
+ };
515
+ /**
516
+ * optional bool flip = 2;
517
+ * @return {boolean}
518
+ */
519
+ proto.clarifai.api.utils.TestProto2.prototype.getFlip = function () {
520
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
521
+ };
522
+ /**
523
+ * @param {boolean} value
524
+ * @return {!proto.clarifai.api.utils.TestProto2} returns this
525
+ */
526
+ proto.clarifai.api.utils.TestProto2.prototype.setFlip = function (value) {
527
+ return jspb.Message.setProto3BooleanField(this, 2, value);
528
+ };
529
+ goog.object.extend(exports, proto.clarifai.api.utils);
@@ -0,0 +1 @@
1
+ export {};