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