clarifai-web-grpc 1.0.0

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 (68) hide show
  1. package/.github/workflows/ci.yml +41 -0
  2. package/.husky/commit-msg +4 -0
  3. package/.husky/pre-commit +4 -0
  4. package/.mocharc.yml +5 -0
  5. package/CHANGELOG.md +6 -0
  6. package/LICENCE +13 -0
  7. package/README.md +43 -0
  8. package/VERSION +1 -0
  9. package/dist/google/api/annotations_pb.d.ts +1 -0
  10. package/dist/google/api/annotations_pb.js +32 -0
  11. package/dist/google/api/http_pb.d.ts +1 -0
  12. package/dist/google/api/http_pb.js +813 -0
  13. package/dist/index.d.ts +5 -0
  14. package/dist/index.js +7 -0
  15. package/dist/proto/clarifai/api/resources_pb.d.ts +1 -0
  16. package/dist/proto/clarifai/api/resources_pb.js +32957 -0
  17. package/dist/proto/clarifai/api/serviceServiceClientPb.d.ts +275 -0
  18. package/dist/proto/clarifai/api/serviceServiceClientPb.js +904 -0
  19. package/dist/proto/clarifai/api/service_pb.d.ts +1 -0
  20. package/dist/proto/clarifai/api/service_pb.js +38791 -0
  21. package/dist/proto/clarifai/api/status/status_code_pb.d.ts +1 -0
  22. package/dist/proto/clarifai/api/status/status_code_pb.js +312 -0
  23. package/dist/proto/clarifai/api/status/status_pb.d.ts +1 -0
  24. package/dist/proto/clarifai/api/status/status_pb.js +473 -0
  25. package/dist/proto/clarifai/api/utils/extensions_pb.d.ts +1 -0
  26. package/dist/proto/clarifai/api/utils/extensions_pb.js +52 -0
  27. package/dist/proto/clarifai/api/utils/test_proto_pb.d.ts +1 -0
  28. package/dist/proto/clarifai/api/utils/test_proto_pb.js +521 -0
  29. package/dist/proto/clarifai/auth/scope/scope_pb.d.ts +1 -0
  30. package/dist/proto/clarifai/auth/scope/scope_pb.js +294 -0
  31. package/dist/proto/clarifai/auth/types/types_pb.d.ts +1 -0
  32. package/dist/proto/clarifai/auth/types/types_pb.js +26 -0
  33. package/dist/proto/clarifai/auth/util/extension_pb.d.ts +1 -0
  34. package/dist/proto/clarifai/auth/util/extension_pb.js +80 -0
  35. package/dist/resources.d.ts +1 -0
  36. package/dist/resources.js +1 -0
  37. package/dist/service.d.ts +1 -0
  38. package/dist/service.js +1 -0
  39. package/google/api/annotations_grpc_pb.js +1 -0
  40. package/google/api/annotations_pb.js +47 -0
  41. package/google/api/http_grpc_pb.js +1 -0
  42. package/google/api/http_pb.js +1005 -0
  43. package/index.ts +9 -0
  44. package/package.json +52 -0
  45. package/proto/clarifai/api/resources_pb.d.ts +5052 -0
  46. package/proto/clarifai/api/resources_pb.js +41204 -0
  47. package/proto/clarifai/api/serviceServiceClientPb.ts +3002 -0
  48. package/proto/clarifai/api/service_pb.d.ts +5582 -0
  49. package/proto/clarifai/api/service_pb.js +47897 -0
  50. package/proto/clarifai/api/status/status_code_pb.d.ts +296 -0
  51. package/proto/clarifai/api/status/status_code_pb.js +314 -0
  52. package/proto/clarifai/api/status/status_pb.d.ts +73 -0
  53. package/proto/clarifai/api/status/status_pb.js +580 -0
  54. package/proto/clarifai/api/utils/extensions_pb.d.ts +4 -0
  55. package/proto/clarifai/api/utils/extensions_pb.js +95 -0
  56. package/proto/clarifai/api/utils/test_proto_pb.d.ts +81 -0
  57. package/proto/clarifai/api/utils/test_proto_pb.js +640 -0
  58. package/proto/clarifai/auth/scope/scope_pb.d.ts +92 -0
  59. package/proto/clarifai/auth/scope/scope_pb.js +363 -0
  60. package/proto/clarifai/auth/types/types_pb.d.ts +10 -0
  61. package/proto/clarifai/auth/types/types_pb.js +28 -0
  62. package/proto/clarifai/auth/util/extension_pb.d.ts +6 -0
  63. package/proto/clarifai/auth/util/extension_pb.js +151 -0
  64. package/resources.ts +1 -0
  65. package/service.desc +10 -0
  66. package/service.ts +1 -0
  67. package/tests/basic.test.ts +14 -0
  68. package/tsconfig.json +25 -0
@@ -0,0 +1,580 @@
1
+ // source: proto/clarifai/api/status/status.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
6
+ * field starts with 'MSG_' and isn't a translatable message.
7
+ * @public
8
+ */
9
+ // GENERATED CODE -- DO NOT EDIT!
10
+
11
+ var jspb = require('google-protobuf');
12
+ var goog = jspb;
13
+ var global = Function('return this')();
14
+
15
+ var proto_clarifai_auth_util_extension_pb = require('../../../../proto/clarifai/auth/util/extension_pb.js');
16
+ goog.object.extend(proto, proto_clarifai_auth_util_extension_pb);
17
+ var proto_clarifai_api_status_status_code_pb = require('../../../../proto/clarifai/api/status/status_code_pb.js');
18
+ goog.object.extend(proto, proto_clarifai_api_status_status_code_pb);
19
+ goog.exportSymbol('proto.clarifai.api.status.BaseResponse', null, global);
20
+ goog.exportSymbol('proto.clarifai.api.status.Status', null, global);
21
+ /**
22
+ * Generated by JsPbCodeGenerator.
23
+ * @param {Array=} opt_data Optional initial data array, typically from a
24
+ * server response, or constructed directly in Javascript. The array is used
25
+ * in place and becomes part of the constructed object. It is not cloned.
26
+ * If no data is provided, the constructed object will be empty, but still
27
+ * valid.
28
+ * @extends {jspb.Message}
29
+ * @constructor
30
+ */
31
+ proto.clarifai.api.status.Status = function(opt_data) {
32
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.status.Status.repeatedFields_, null);
33
+ };
34
+ goog.inherits(proto.clarifai.api.status.Status, jspb.Message);
35
+ if (goog.DEBUG && !COMPILED) {
36
+ /**
37
+ * @public
38
+ * @override
39
+ */
40
+ proto.clarifai.api.status.Status.displayName = 'proto.clarifai.api.status.Status';
41
+ }
42
+ /**
43
+ * Generated by JsPbCodeGenerator.
44
+ * @param {Array=} opt_data Optional initial data array, typically from a
45
+ * server response, or constructed directly in Javascript. The array is used
46
+ * in place and becomes part of the constructed object. It is not cloned.
47
+ * If no data is provided, the constructed object will be empty, but still
48
+ * valid.
49
+ * @extends {jspb.Message}
50
+ * @constructor
51
+ */
52
+ proto.clarifai.api.status.BaseResponse = function(opt_data) {
53
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
54
+ };
55
+ goog.inherits(proto.clarifai.api.status.BaseResponse, jspb.Message);
56
+ if (goog.DEBUG && !COMPILED) {
57
+ /**
58
+ * @public
59
+ * @override
60
+ */
61
+ proto.clarifai.api.status.BaseResponse.displayName = 'proto.clarifai.api.status.BaseResponse';
62
+ }
63
+
64
+ /**
65
+ * List of repeated fields within this message type.
66
+ * @private {!Array<number>}
67
+ * @const
68
+ */
69
+ proto.clarifai.api.status.Status.repeatedFields_ = [4];
70
+
71
+
72
+
73
+ if (jspb.Message.GENERATE_TO_OBJECT) {
74
+ /**
75
+ * Creates an object representation of this proto.
76
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
77
+ * Optional fields that are not set will be set to undefined.
78
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
79
+ * For the list of reserved names please see:
80
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
81
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
82
+ * JSPB instance for transitional soy proto support:
83
+ * http://goto/soy-param-migration
84
+ * @return {!Object}
85
+ */
86
+ proto.clarifai.api.status.Status.prototype.toObject = function(opt_includeInstance) {
87
+ return proto.clarifai.api.status.Status.toObject(opt_includeInstance, this);
88
+ };
89
+
90
+
91
+ /**
92
+ * Static version of the {@see toObject} method.
93
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
94
+ * the JSPB instance for transitional soy proto support:
95
+ * http://goto/soy-param-migration
96
+ * @param {!proto.clarifai.api.status.Status} msg The msg instance to transform.
97
+ * @return {!Object}
98
+ * @suppress {unusedLocalVariables} f is only used for nested messages
99
+ */
100
+ proto.clarifai.api.status.Status.toObject = function(includeInstance, msg) {
101
+ var f, obj = {
102
+ code: jspb.Message.getFieldWithDefault(msg, 1, 0),
103
+ description: jspb.Message.getFieldWithDefault(msg, 2, ""),
104
+ details: jspb.Message.getFieldWithDefault(msg, 3, ""),
105
+ stackTraceList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
106
+ percentCompleted: jspb.Message.getFieldWithDefault(msg, 5, 0),
107
+ timeRemaining: jspb.Message.getFieldWithDefault(msg, 6, 0),
108
+ reqId: jspb.Message.getFieldWithDefault(msg, 7, ""),
109
+ internalDetails: jspb.Message.getFieldWithDefault(msg, 8, "")
110
+ };
111
+
112
+ if (includeInstance) {
113
+ obj.$jspbMessageInstance = msg;
114
+ }
115
+ return obj;
116
+ };
117
+ }
118
+
119
+
120
+ /**
121
+ * Deserializes binary data (in protobuf wire format).
122
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
123
+ * @return {!proto.clarifai.api.status.Status}
124
+ */
125
+ proto.clarifai.api.status.Status.deserializeBinary = function(bytes) {
126
+ var reader = new jspb.BinaryReader(bytes);
127
+ var msg = new proto.clarifai.api.status.Status;
128
+ return proto.clarifai.api.status.Status.deserializeBinaryFromReader(msg, reader);
129
+ };
130
+
131
+
132
+ /**
133
+ * Deserializes binary data (in protobuf wire format) from the
134
+ * given reader into the given message object.
135
+ * @param {!proto.clarifai.api.status.Status} msg The message object to deserialize into.
136
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
137
+ * @return {!proto.clarifai.api.status.Status}
138
+ */
139
+ proto.clarifai.api.status.Status.deserializeBinaryFromReader = function(msg, reader) {
140
+ while (reader.nextField()) {
141
+ if (reader.isEndGroup()) {
142
+ break;
143
+ }
144
+ var field = reader.getFieldNumber();
145
+ switch (field) {
146
+ case 1:
147
+ var value = /** @type {!proto.clarifai.api.status.StatusCode} */ (reader.readEnum());
148
+ msg.setCode(value);
149
+ break;
150
+ case 2:
151
+ var value = /** @type {string} */ (reader.readString());
152
+ msg.setDescription(value);
153
+ break;
154
+ case 3:
155
+ var value = /** @type {string} */ (reader.readString());
156
+ msg.setDetails(value);
157
+ break;
158
+ case 4:
159
+ var value = /** @type {string} */ (reader.readString());
160
+ msg.addStackTrace(value);
161
+ break;
162
+ case 5:
163
+ var value = /** @type {number} */ (reader.readUint32());
164
+ msg.setPercentCompleted(value);
165
+ break;
166
+ case 6:
167
+ var value = /** @type {number} */ (reader.readUint32());
168
+ msg.setTimeRemaining(value);
169
+ break;
170
+ case 7:
171
+ var value = /** @type {string} */ (reader.readString());
172
+ msg.setReqId(value);
173
+ break;
174
+ case 8:
175
+ var value = /** @type {string} */ (reader.readString());
176
+ msg.setInternalDetails(value);
177
+ break;
178
+ default:
179
+ reader.skipField();
180
+ break;
181
+ }
182
+ }
183
+ return msg;
184
+ };
185
+
186
+
187
+ /**
188
+ * Serializes the message to binary data (in protobuf wire format).
189
+ * @return {!Uint8Array}
190
+ */
191
+ proto.clarifai.api.status.Status.prototype.serializeBinary = function() {
192
+ var writer = new jspb.BinaryWriter();
193
+ proto.clarifai.api.status.Status.serializeBinaryToWriter(this, writer);
194
+ return writer.getResultBuffer();
195
+ };
196
+
197
+
198
+ /**
199
+ * Serializes the given message to binary data (in protobuf wire
200
+ * format), writing to the given BinaryWriter.
201
+ * @param {!proto.clarifai.api.status.Status} message
202
+ * @param {!jspb.BinaryWriter} writer
203
+ * @suppress {unusedLocalVariables} f is only used for nested messages
204
+ */
205
+ proto.clarifai.api.status.Status.serializeBinaryToWriter = function(message, writer) {
206
+ var f = undefined;
207
+ f = message.getCode();
208
+ if (f !== 0.0) {
209
+ writer.writeEnum(
210
+ 1,
211
+ f
212
+ );
213
+ }
214
+ f = message.getDescription();
215
+ if (f.length > 0) {
216
+ writer.writeString(
217
+ 2,
218
+ f
219
+ );
220
+ }
221
+ f = message.getDetails();
222
+ if (f.length > 0) {
223
+ writer.writeString(
224
+ 3,
225
+ f
226
+ );
227
+ }
228
+ f = message.getStackTraceList();
229
+ if (f.length > 0) {
230
+ writer.writeRepeatedString(
231
+ 4,
232
+ f
233
+ );
234
+ }
235
+ f = message.getPercentCompleted();
236
+ if (f !== 0) {
237
+ writer.writeUint32(
238
+ 5,
239
+ f
240
+ );
241
+ }
242
+ f = message.getTimeRemaining();
243
+ if (f !== 0) {
244
+ writer.writeUint32(
245
+ 6,
246
+ f
247
+ );
248
+ }
249
+ f = message.getReqId();
250
+ if (f.length > 0) {
251
+ writer.writeString(
252
+ 7,
253
+ f
254
+ );
255
+ }
256
+ f = message.getInternalDetails();
257
+ if (f.length > 0) {
258
+ writer.writeString(
259
+ 8,
260
+ f
261
+ );
262
+ }
263
+ };
264
+
265
+
266
+ /**
267
+ * optional StatusCode code = 1;
268
+ * @return {!proto.clarifai.api.status.StatusCode}
269
+ */
270
+ proto.clarifai.api.status.Status.prototype.getCode = function() {
271
+ return /** @type {!proto.clarifai.api.status.StatusCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
272
+ };
273
+
274
+
275
+ /**
276
+ * @param {!proto.clarifai.api.status.StatusCode} value
277
+ * @return {!proto.clarifai.api.status.Status} returns this
278
+ */
279
+ proto.clarifai.api.status.Status.prototype.setCode = function(value) {
280
+ return jspb.Message.setProto3EnumField(this, 1, value);
281
+ };
282
+
283
+
284
+ /**
285
+ * optional string description = 2;
286
+ * @return {string}
287
+ */
288
+ proto.clarifai.api.status.Status.prototype.getDescription = function() {
289
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
290
+ };
291
+
292
+
293
+ /**
294
+ * @param {string} value
295
+ * @return {!proto.clarifai.api.status.Status} returns this
296
+ */
297
+ proto.clarifai.api.status.Status.prototype.setDescription = function(value) {
298
+ return jspb.Message.setProto3StringField(this, 2, value);
299
+ };
300
+
301
+
302
+ /**
303
+ * optional string details = 3;
304
+ * @return {string}
305
+ */
306
+ proto.clarifai.api.status.Status.prototype.getDetails = function() {
307
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
308
+ };
309
+
310
+
311
+ /**
312
+ * @param {string} value
313
+ * @return {!proto.clarifai.api.status.Status} returns this
314
+ */
315
+ proto.clarifai.api.status.Status.prototype.setDetails = function(value) {
316
+ return jspb.Message.setProto3StringField(this, 3, value);
317
+ };
318
+
319
+
320
+ /**
321
+ * repeated string stack_trace = 4;
322
+ * @return {!Array<string>}
323
+ */
324
+ proto.clarifai.api.status.Status.prototype.getStackTraceList = function() {
325
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
326
+ };
327
+
328
+
329
+ /**
330
+ * @param {!Array<string>} value
331
+ * @return {!proto.clarifai.api.status.Status} returns this
332
+ */
333
+ proto.clarifai.api.status.Status.prototype.setStackTraceList = function(value) {
334
+ return jspb.Message.setField(this, 4, value || []);
335
+ };
336
+
337
+
338
+ /**
339
+ * @param {string} value
340
+ * @param {number=} opt_index
341
+ * @return {!proto.clarifai.api.status.Status} returns this
342
+ */
343
+ proto.clarifai.api.status.Status.prototype.addStackTrace = function(value, opt_index) {
344
+ return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
345
+ };
346
+
347
+
348
+ /**
349
+ * Clears the list making it empty but non-null.
350
+ * @return {!proto.clarifai.api.status.Status} returns this
351
+ */
352
+ proto.clarifai.api.status.Status.prototype.clearStackTraceList = function() {
353
+ return this.setStackTraceList([]);
354
+ };
355
+
356
+
357
+ /**
358
+ * optional uint32 percent_completed = 5;
359
+ * @return {number}
360
+ */
361
+ proto.clarifai.api.status.Status.prototype.getPercentCompleted = function() {
362
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
363
+ };
364
+
365
+
366
+ /**
367
+ * @param {number} value
368
+ * @return {!proto.clarifai.api.status.Status} returns this
369
+ */
370
+ proto.clarifai.api.status.Status.prototype.setPercentCompleted = function(value) {
371
+ return jspb.Message.setProto3IntField(this, 5, value);
372
+ };
373
+
374
+
375
+ /**
376
+ * optional uint32 time_remaining = 6;
377
+ * @return {number}
378
+ */
379
+ proto.clarifai.api.status.Status.prototype.getTimeRemaining = function() {
380
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
381
+ };
382
+
383
+
384
+ /**
385
+ * @param {number} value
386
+ * @return {!proto.clarifai.api.status.Status} returns this
387
+ */
388
+ proto.clarifai.api.status.Status.prototype.setTimeRemaining = function(value) {
389
+ return jspb.Message.setProto3IntField(this, 6, value);
390
+ };
391
+
392
+
393
+ /**
394
+ * optional string req_id = 7;
395
+ * @return {string}
396
+ */
397
+ proto.clarifai.api.status.Status.prototype.getReqId = function() {
398
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
399
+ };
400
+
401
+
402
+ /**
403
+ * @param {string} value
404
+ * @return {!proto.clarifai.api.status.Status} returns this
405
+ */
406
+ proto.clarifai.api.status.Status.prototype.setReqId = function(value) {
407
+ return jspb.Message.setProto3StringField(this, 7, value);
408
+ };
409
+
410
+
411
+ /**
412
+ * optional string internal_details = 8;
413
+ * @return {string}
414
+ */
415
+ proto.clarifai.api.status.Status.prototype.getInternalDetails = function() {
416
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
417
+ };
418
+
419
+
420
+ /**
421
+ * @param {string} value
422
+ * @return {!proto.clarifai.api.status.Status} returns this
423
+ */
424
+ proto.clarifai.api.status.Status.prototype.setInternalDetails = function(value) {
425
+ return jspb.Message.setProto3StringField(this, 8, value);
426
+ };
427
+
428
+
429
+
430
+
431
+
432
+ if (jspb.Message.GENERATE_TO_OBJECT) {
433
+ /**
434
+ * Creates an object representation of this proto.
435
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
436
+ * Optional fields that are not set will be set to undefined.
437
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
438
+ * For the list of reserved names please see:
439
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
440
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
441
+ * JSPB instance for transitional soy proto support:
442
+ * http://goto/soy-param-migration
443
+ * @return {!Object}
444
+ */
445
+ proto.clarifai.api.status.BaseResponse.prototype.toObject = function(opt_includeInstance) {
446
+ return proto.clarifai.api.status.BaseResponse.toObject(opt_includeInstance, this);
447
+ };
448
+
449
+
450
+ /**
451
+ * Static version of the {@see toObject} method.
452
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
453
+ * the JSPB instance for transitional soy proto support:
454
+ * http://goto/soy-param-migration
455
+ * @param {!proto.clarifai.api.status.BaseResponse} msg The msg instance to transform.
456
+ * @return {!Object}
457
+ * @suppress {unusedLocalVariables} f is only used for nested messages
458
+ */
459
+ proto.clarifai.api.status.BaseResponse.toObject = function(includeInstance, msg) {
460
+ var f, obj = {
461
+ status: (f = msg.getStatus()) && proto.clarifai.api.status.Status.toObject(includeInstance, f)
462
+ };
463
+
464
+ if (includeInstance) {
465
+ obj.$jspbMessageInstance = msg;
466
+ }
467
+ return obj;
468
+ };
469
+ }
470
+
471
+
472
+ /**
473
+ * Deserializes binary data (in protobuf wire format).
474
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
475
+ * @return {!proto.clarifai.api.status.BaseResponse}
476
+ */
477
+ proto.clarifai.api.status.BaseResponse.deserializeBinary = function(bytes) {
478
+ var reader = new jspb.BinaryReader(bytes);
479
+ var msg = new proto.clarifai.api.status.BaseResponse;
480
+ return proto.clarifai.api.status.BaseResponse.deserializeBinaryFromReader(msg, reader);
481
+ };
482
+
483
+
484
+ /**
485
+ * Deserializes binary data (in protobuf wire format) from the
486
+ * given reader into the given message object.
487
+ * @param {!proto.clarifai.api.status.BaseResponse} msg The message object to deserialize into.
488
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
489
+ * @return {!proto.clarifai.api.status.BaseResponse}
490
+ */
491
+ proto.clarifai.api.status.BaseResponse.deserializeBinaryFromReader = function(msg, reader) {
492
+ while (reader.nextField()) {
493
+ if (reader.isEndGroup()) {
494
+ break;
495
+ }
496
+ var field = reader.getFieldNumber();
497
+ switch (field) {
498
+ case 1:
499
+ var value = new proto.clarifai.api.status.Status;
500
+ reader.readMessage(value,proto.clarifai.api.status.Status.deserializeBinaryFromReader);
501
+ msg.setStatus(value);
502
+ break;
503
+ default:
504
+ reader.skipField();
505
+ break;
506
+ }
507
+ }
508
+ return msg;
509
+ };
510
+
511
+
512
+ /**
513
+ * Serializes the message to binary data (in protobuf wire format).
514
+ * @return {!Uint8Array}
515
+ */
516
+ proto.clarifai.api.status.BaseResponse.prototype.serializeBinary = function() {
517
+ var writer = new jspb.BinaryWriter();
518
+ proto.clarifai.api.status.BaseResponse.serializeBinaryToWriter(this, writer);
519
+ return writer.getResultBuffer();
520
+ };
521
+
522
+
523
+ /**
524
+ * Serializes the given message to binary data (in protobuf wire
525
+ * format), writing to the given BinaryWriter.
526
+ * @param {!proto.clarifai.api.status.BaseResponse} message
527
+ * @param {!jspb.BinaryWriter} writer
528
+ * @suppress {unusedLocalVariables} f is only used for nested messages
529
+ */
530
+ proto.clarifai.api.status.BaseResponse.serializeBinaryToWriter = function(message, writer) {
531
+ var f = undefined;
532
+ f = message.getStatus();
533
+ if (f != null) {
534
+ writer.writeMessage(
535
+ 1,
536
+ f,
537
+ proto.clarifai.api.status.Status.serializeBinaryToWriter
538
+ );
539
+ }
540
+ };
541
+
542
+
543
+ /**
544
+ * optional Status status = 1;
545
+ * @return {?proto.clarifai.api.status.Status}
546
+ */
547
+ proto.clarifai.api.status.BaseResponse.prototype.getStatus = function() {
548
+ return /** @type{?proto.clarifai.api.status.Status} */ (
549
+ jspb.Message.getWrapperField(this, proto.clarifai.api.status.Status, 1));
550
+ };
551
+
552
+
553
+ /**
554
+ * @param {?proto.clarifai.api.status.Status|undefined} value
555
+ * @return {!proto.clarifai.api.status.BaseResponse} returns this
556
+ */
557
+ proto.clarifai.api.status.BaseResponse.prototype.setStatus = function(value) {
558
+ return jspb.Message.setWrapperField(this, 1, value);
559
+ };
560
+
561
+
562
+ /**
563
+ * Clears the message field making it undefined.
564
+ * @return {!proto.clarifai.api.status.BaseResponse} returns this
565
+ */
566
+ proto.clarifai.api.status.BaseResponse.prototype.clearStatus = function() {
567
+ return this.setStatus(undefined);
568
+ };
569
+
570
+
571
+ /**
572
+ * Returns whether this field is set.
573
+ * @return {boolean}
574
+ */
575
+ proto.clarifai.api.status.BaseResponse.prototype.hasStatus = function() {
576
+ return jspb.Message.getField(this, 1) != null;
577
+ };
578
+
579
+
580
+ goog.object.extend(exports, proto.clarifai.api.status);
@@ -0,0 +1,4 @@
1
+ import * as jspb from "google-protobuf"
2
+
3
+ import * as google_protobuf_descriptor_pb from 'google-protobuf/google/protobuf/descriptor_pb';
4
+
@@ -0,0 +1,95 @@
1
+ // source: proto/clarifai/api/utils/extensions.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
6
+ * field starts with 'MSG_' and isn't a translatable message.
7
+ * @public
8
+ */
9
+ // GENERATED CODE -- DO NOT EDIT!
10
+
11
+ var jspb = require('google-protobuf');
12
+ var goog = jspb;
13
+ var global = Function('return this')();
14
+
15
+ var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
16
+ goog.object.extend(proto, google_protobuf_descriptor_pb);
17
+ goog.exportSymbol('proto.clarifai.api.utils.clDefaultFloat', null, global);
18
+ goog.exportSymbol('proto.clarifai.api.utils.clMoretags', null, global);
19
+ goog.exportSymbol('proto.clarifai.api.utils.clShowIfEmpty', null, global);
20
+
21
+ /**
22
+ * A tuple of {field number, class constructor} for the extension
23
+ * field named `clShowIfEmpty`.
24
+ * @type {!jspb.ExtensionFieldInfo<boolean>}
25
+ */
26
+ proto.clarifai.api.utils.clShowIfEmpty = new jspb.ExtensionFieldInfo(
27
+ 50000,
28
+ {clShowIfEmpty: 0},
29
+ null,
30
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
31
+ null),
32
+ 0);
33
+
34
+ google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[50000] = new jspb.ExtensionFieldBinaryInfo(
35
+ proto.clarifai.api.utils.clShowIfEmpty,
36
+ jspb.BinaryReader.prototype.readBool,
37
+ jspb.BinaryWriter.prototype.writeBool,
38
+ undefined,
39
+ undefined,
40
+ false);
41
+ // This registers the extension field with the extended class, so that
42
+ // toObject() will function correctly.
43
+ google_protobuf_descriptor_pb.FieldOptions.extensions[50000] = proto.clarifai.api.utils.clShowIfEmpty;
44
+
45
+
46
+ /**
47
+ * A tuple of {field number, class constructor} for the extension
48
+ * field named `clMoretags`.
49
+ * @type {!jspb.ExtensionFieldInfo<string>}
50
+ */
51
+ proto.clarifai.api.utils.clMoretags = new jspb.ExtensionFieldInfo(
52
+ 50001,
53
+ {clMoretags: 0},
54
+ null,
55
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
56
+ null),
57
+ 0);
58
+
59
+ google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[50001] = new jspb.ExtensionFieldBinaryInfo(
60
+ proto.clarifai.api.utils.clMoretags,
61
+ jspb.BinaryReader.prototype.readString,
62
+ jspb.BinaryWriter.prototype.writeString,
63
+ undefined,
64
+ undefined,
65
+ false);
66
+ // This registers the extension field with the extended class, so that
67
+ // toObject() will function correctly.
68
+ google_protobuf_descriptor_pb.FieldOptions.extensions[50001] = proto.clarifai.api.utils.clMoretags;
69
+
70
+
71
+ /**
72
+ * A tuple of {field number, class constructor} for the extension
73
+ * field named `clDefaultFloat`.
74
+ * @type {!jspb.ExtensionFieldInfo<number>}
75
+ */
76
+ proto.clarifai.api.utils.clDefaultFloat = new jspb.ExtensionFieldInfo(
77
+ 50010,
78
+ {clDefaultFloat: 0},
79
+ null,
80
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
81
+ null),
82
+ 0);
83
+
84
+ google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[50010] = new jspb.ExtensionFieldBinaryInfo(
85
+ proto.clarifai.api.utils.clDefaultFloat,
86
+ jspb.BinaryReader.prototype.readFloat,
87
+ jspb.BinaryWriter.prototype.writeFloat,
88
+ undefined,
89
+ undefined,
90
+ false);
91
+ // This registers the extension field with the extended class, so that
92
+ // toObject() will function correctly.
93
+ google_protobuf_descriptor_pb.FieldOptions.extensions[50010] = proto.clarifai.api.utils.clDefaultFloat;
94
+
95
+ goog.object.extend(exports, proto.clarifai.api.utils);