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