clarifai-web-grpc 1.1.7 → 2.0.2

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