clarifai-web-grpc 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/lib/google/api/annotations_grpc_pb.js +1 -2
  3. package/lib/google/api/annotations_pb.js +19 -4
  4. package/lib/google/api/http_grpc_pb.js +1 -2
  5. package/lib/google/api/http_pb.js +606 -414
  6. package/lib/proto/clarifai/api/resources_pb.d.ts +5052 -1
  7. package/lib/proto/clarifai/api/resources_pb.js +26126 -17879
  8. package/lib/proto/clarifai/api/serviceServiceClientPb.ts +3002 -0
  9. package/lib/proto/clarifai/api/service_pb.d.ts +5582 -1
  10. package/lib/proto/clarifai/api/service_pb.js +30050 -20944
  11. package/lib/proto/clarifai/api/status/status_code_pb.d.ts +296 -1
  12. package/lib/proto/clarifai/api/status/status_code_pb.js +295 -293
  13. package/lib/proto/clarifai/api/status/status_pb.d.ts +73 -1
  14. package/lib/proto/clarifai/api/status/status_pb.js +357 -250
  15. package/lib/proto/clarifai/api/utils/extensions_pb.d.ts +4 -1
  16. package/lib/proto/clarifai/api/utils/extensions_pb.js +53 -10
  17. package/lib/proto/clarifai/api/utils/test_proto_pb.d.ts +81 -1
  18. package/lib/proto/clarifai/api/utils/test_proto_pb.js +385 -266
  19. package/lib/proto/clarifai/auth/scope/scope_pb.d.ts +92 -1
  20. package/lib/proto/clarifai/auth/scope/scope_pb.js +232 -163
  21. package/lib/proto/clarifai/auth/types/types_pb.d.ts +10 -1
  22. package/lib/proto/clarifai/auth/types/types_pb.js +9 -7
  23. package/lib/proto/clarifai/auth/util/extension_pb.d.ts +6 -1
  24. package/lib/proto/clarifai/auth/util/extension_pb.js +87 -16
  25. package/package.json +15 -24
  26. package/tests/basic.test.ts +4 -30
  27. package/tests/helpers.test.ts +25 -41
  28. package/tsconfig.json +5 -4
  29. package/dist/google/api/annotations_grpc_pb.d.ts +0 -0
  30. package/dist/google/api/annotations_grpc_pb.js +0 -2
  31. package/dist/google/api/annotations_pb.d.ts +0 -1
  32. package/dist/google/api/annotations_pb.js +0 -32
  33. package/dist/google/api/http_grpc_pb.d.ts +0 -0
  34. package/dist/google/api/http_grpc_pb.js +0 -2
  35. package/dist/google/api/http_pb.d.ts +0 -1
  36. package/dist/google/api/http_pb.js +0 -813
  37. package/dist/index.d.ts +0 -5
  38. package/dist/index.js +0 -11
  39. package/dist/proto/clarifai/api/resources_pb.d.ts +0 -1
  40. package/dist/proto/clarifai/api/resources_pb.js +0 -32957
  41. package/dist/proto/clarifai/api/serviceServiceClientPb.d.ts +0 -275
  42. package/dist/proto/clarifai/api/serviceServiceClientPb.js +0 -908
  43. package/dist/proto/clarifai/api/service_pb.d.ts +0 -1
  44. package/dist/proto/clarifai/api/service_pb.js +0 -38791
  45. package/dist/proto/clarifai/api/status/status_code_pb.d.ts +0 -1
  46. package/dist/proto/clarifai/api/status/status_code_pb.js +0 -312
  47. package/dist/proto/clarifai/api/status/status_pb.d.ts +0 -1
  48. package/dist/proto/clarifai/api/status/status_pb.js +0 -473
  49. package/dist/proto/clarifai/api/utils/extensions_pb.d.ts +0 -1
  50. package/dist/proto/clarifai/api/utils/extensions_pb.js +0 -52
  51. package/dist/proto/clarifai/api/utils/test_proto_pb.d.ts +0 -1
  52. package/dist/proto/clarifai/api/utils/test_proto_pb.js +0 -521
  53. package/dist/proto/clarifai/auth/scope/scope_pb.d.ts +0 -1
  54. package/dist/proto/clarifai/auth/scope/scope_pb.js +0 -294
  55. package/dist/proto/clarifai/auth/types/types_pb.d.ts +0 -1
  56. package/dist/proto/clarifai/auth/types/types_pb.js +0 -26
  57. package/dist/proto/clarifai/auth/util/extension_pb.d.ts +0 -1
  58. package/dist/proto/clarifai/auth/util/extension_pb.js +0 -80
  59. package/dist/resources.d.ts +0 -12
  60. package/dist/resources.js +0 -47
  61. package/dist/service.d.ts +0 -1
  62. package/dist/service.js +0 -13
  63. package/tsconfig.cjs.json +0 -7
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  // source: proto/clarifai/api/utils/test_proto.proto
3
2
  /**
4
3
  * @fileoverview
@@ -8,9 +7,11 @@
8
7
  * @public
9
8
  */
10
9
  // 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
+
14
15
  var proto_clarifai_api_utils_extensions_pb = require('../../../../proto/clarifai/api/utils/extensions_pb.js');
15
16
  goog.object.extend(proto, proto_clarifai_api_utils_extensions_pb);
16
17
  goog.exportSymbol('proto.clarifai.api.utils.TestProto', null, global);
@@ -26,16 +27,16 @@ goog.exportSymbol('proto.clarifai.api.utils.TestProto2', null, global);
26
27
  * @extends {jspb.Message}
27
28
  * @constructor
28
29
  */
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_);
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_);
31
32
  };
32
33
  goog.inherits(proto.clarifai.api.utils.TestProto, jspb.Message);
33
34
  if (goog.DEBUG && !COMPILED) {
34
- /**
35
- * @public
36
- * @override
37
- */
38
- proto.clarifai.api.utils.TestProto.displayName = 'proto.clarifai.api.utils.TestProto';
35
+ /**
36
+ * @public
37
+ * @override
38
+ */
39
+ proto.clarifai.api.utils.TestProto.displayName = 'proto.clarifai.api.utils.TestProto';
39
40
  }
40
41
  /**
41
42
  * Generated by JsPbCodeGenerator.
@@ -47,17 +48,18 @@ if (goog.DEBUG && !COMPILED) {
47
48
  * @extends {jspb.Message}
48
49
  * @constructor
49
50
  */
50
- proto.clarifai.api.utils.TestProto2 = function (opt_data) {
51
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
51
+ proto.clarifai.api.utils.TestProto2 = function(opt_data) {
52
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
52
53
  };
53
54
  goog.inherits(proto.clarifai.api.utils.TestProto2, jspb.Message);
54
55
  if (goog.DEBUG && !COMPILED) {
55
- /**
56
- * @public
57
- * @override
58
- */
59
- proto.clarifai.api.utils.TestProto2.displayName = 'proto.clarifai.api.utils.TestProto2';
56
+ /**
57
+ * @public
58
+ * @override
59
+ */
60
+ proto.clarifai.api.utils.TestProto2.displayName = 'proto.clarifai.api.utils.TestProto2';
60
61
  }
62
+
61
63
  /**
62
64
  * Oneof group definitions for this message. Each group defines the field
63
65
  * numbers belonging to that group. When of these fields' value is set, all
@@ -66,73 +68,85 @@ if (goog.DEBUG && !COMPILED) {
66
68
  * @private {!Array<!Array<number>>}
67
69
  * @const
68
70
  */
69
- proto.clarifai.api.utils.TestProto.oneofGroups_ = [[5, 6, 7]];
71
+ proto.clarifai.api.utils.TestProto.oneofGroups_ = [[5,6,7]];
72
+
70
73
  /**
71
74
  * @enum {number}
72
75
  */
73
76
  proto.clarifai.api.utils.TestProto.OneOfFieldCase = {
74
- ONE_OF_FIELD_NOT_SET: 0,
75
- STRING_ONEOF: 5,
76
- BOOL_ONEOF: 6,
77
- MESSAGE_ONEOF: 7
77
+ ONE_OF_FIELD_NOT_SET: 0,
78
+ STRING_ONEOF: 5,
79
+ BOOL_ONEOF: 6,
80
+ MESSAGE_ONEOF: 7
78
81
  };
82
+
79
83
  /**
80
84
  * @return {proto.clarifai.api.utils.TestProto.OneOfFieldCase}
81
85
  */
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]));
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]));
84
88
  };
89
+
90
+
91
+
85
92
  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.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
- };
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
+ };
125
135
  }
136
+
137
+
126
138
  /**
127
139
  * Deserializes binary data (in protobuf wire format).
128
140
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
129
141
  * @return {!proto.clarifai.api.utils.TestProto}
130
142
  */
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);
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);
135
147
  };
148
+
149
+
136
150
  /**
137
151
  * Deserializes binary data (in protobuf wire format) from the
138
152
  * given reader into the given message object.
@@ -140,58 +154,62 @@ proto.clarifai.api.utils.TestProto.deserializeBinary = function (bytes) {
140
154
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
141
155
  * @return {!proto.clarifai.api.utils.TestProto}
142
156
  */
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
- }
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;
183
196
  }
184
- return msg;
197
+ }
198
+ return msg;
185
199
  };
200
+
201
+
186
202
  /**
187
203
  * Serializes the message to binary data (in protobuf wire format).
188
204
  * @return {!Uint8Array}
189
205
  */
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();
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();
194
210
  };
211
+
212
+
195
213
  /**
196
214
  * Serializes the given message to binary data (in protobuf wire
197
215
  * format), writing to the given BinaryWriter.
@@ -199,94 +217,135 @@ proto.clarifai.api.utils.TestProto.prototype.serializeBinary = function () {
199
217
  * @param {!jspb.BinaryWriter} writer
200
218
  * @suppress {unusedLocalVariables} f is only used for nested messages
201
219
  */
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
- };
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
+
233
275
  /**
234
276
  * optional string id = 1;
235
277
  * @return {string}
236
278
  */
237
- proto.clarifai.api.utils.TestProto.prototype.getId = function () {
238
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
279
+ proto.clarifai.api.utils.TestProto.prototype.getId = function() {
280
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
239
281
  };
282
+
283
+
240
284
  /**
241
285
  * @param {string} value
242
286
  * @return {!proto.clarifai.api.utils.TestProto} returns this
243
287
  */
244
- proto.clarifai.api.utils.TestProto.prototype.setId = function (value) {
245
- return jspb.Message.setProto3StringField(this, 1, value);
288
+ proto.clarifai.api.utils.TestProto.prototype.setId = function(value) {
289
+ return jspb.Message.setProto3StringField(this, 1, value);
246
290
  };
291
+
292
+
247
293
  /**
248
294
  * optional string message = 2;
249
295
  * @return {string}
250
296
  */
251
- proto.clarifai.api.utils.TestProto.prototype.getMessage = function () {
252
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
297
+ proto.clarifai.api.utils.TestProto.prototype.getMessage = function() {
298
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
253
299
  };
300
+
301
+
254
302
  /**
255
303
  * @param {string} value
256
304
  * @return {!proto.clarifai.api.utils.TestProto} returns this
257
305
  */
258
- proto.clarifai.api.utils.TestProto.prototype.setMessage = function (value) {
259
- return jspb.Message.setProto3StringField(this, 2, value);
306
+ proto.clarifai.api.utils.TestProto.prototype.setMessage = function(value) {
307
+ return jspb.Message.setProto3StringField(this, 2, value);
260
308
  };
309
+
310
+
261
311
  /**
262
312
  * optional double value = 3;
263
313
  * @return {number}
264
314
  */
265
- proto.clarifai.api.utils.TestProto.prototype.getValue = function () {
266
- return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
315
+ proto.clarifai.api.utils.TestProto.prototype.getValue = function() {
316
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
267
317
  };
318
+
319
+
268
320
  /**
269
321
  * @param {number} value
270
322
  * @return {!proto.clarifai.api.utils.TestProto} returns this
271
323
  */
272
- proto.clarifai.api.utils.TestProto.prototype.setValue = function (value) {
273
- return jspb.Message.setProto3FloatField(this, 3, value);
324
+ proto.clarifai.api.utils.TestProto.prototype.setValue = function(value) {
325
+ return jspb.Message.setProto3FloatField(this, 3, value);
274
326
  };
327
+
328
+
275
329
  /**
276
330
  * optional bytes image_bytes = 4;
277
331
  * @return {string}
278
332
  */
279
- proto.clarifai.api.utils.TestProto.prototype.getImageBytes = function () {
280
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
333
+ proto.clarifai.api.utils.TestProto.prototype.getImageBytes = function() {
334
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
281
335
  };
336
+
337
+
282
338
  /**
283
339
  * optional bytes image_bytes = 4;
284
340
  * This is a type-conversion wrapper around `getImageBytes()`
285
341
  * @return {string}
286
342
  */
287
- proto.clarifai.api.utils.TestProto.prototype.getImageBytes_asB64 = function () {
288
- return /** @type {string} */ (jspb.Message.bytesAsB64(this.getImageBytes()));
343
+ proto.clarifai.api.utils.TestProto.prototype.getImageBytes_asB64 = function() {
344
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
345
+ this.getImageBytes()));
289
346
  };
347
+
348
+
290
349
  /**
291
350
  * optional bytes image_bytes = 4;
292
351
  * Note that Uint8Array is not supported on all browsers.
@@ -294,146 +353,186 @@ proto.clarifai.api.utils.TestProto.prototype.getImageBytes_asB64 = function () {
294
353
  * This is a type-conversion wrapper around `getImageBytes()`
295
354
  * @return {!Uint8Array}
296
355
  */
297
- proto.clarifai.api.utils.TestProto.prototype.getImageBytes_asU8 = function () {
298
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getImageBytes()));
356
+ proto.clarifai.api.utils.TestProto.prototype.getImageBytes_asU8 = function() {
357
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
358
+ this.getImageBytes()));
299
359
  };
360
+
361
+
300
362
  /**
301
363
  * @param {!(string|Uint8Array)} value
302
364
  * @return {!proto.clarifai.api.utils.TestProto} returns this
303
365
  */
304
- proto.clarifai.api.utils.TestProto.prototype.setImageBytes = function (value) {
305
- return jspb.Message.setProto3BytesField(this, 4, value);
366
+ proto.clarifai.api.utils.TestProto.prototype.setImageBytes = function(value) {
367
+ return jspb.Message.setProto3BytesField(this, 4, value);
306
368
  };
369
+
370
+
307
371
  /**
308
372
  * optional string string_oneof = 5;
309
373
  * @return {string}
310
374
  */
311
- proto.clarifai.api.utils.TestProto.prototype.getStringOneof = function () {
312
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
375
+ proto.clarifai.api.utils.TestProto.prototype.getStringOneof = function() {
376
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
313
377
  };
378
+
379
+
314
380
  /**
315
381
  * @param {string} value
316
382
  * @return {!proto.clarifai.api.utils.TestProto} returns this
317
383
  */
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);
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);
320
386
  };
387
+
388
+
321
389
  /**
322
390
  * Clears the field making it undefined.
323
391
  * @return {!proto.clarifai.api.utils.TestProto} returns this
324
392
  */
325
- proto.clarifai.api.utils.TestProto.prototype.clearStringOneof = function () {
326
- return jspb.Message.setOneofField(this, 5, proto.clarifai.api.utils.TestProto.oneofGroups_[0], undefined);
393
+ proto.clarifai.api.utils.TestProto.prototype.clearStringOneof = function() {
394
+ return jspb.Message.setOneofField(this, 5, proto.clarifai.api.utils.TestProto.oneofGroups_[0], undefined);
327
395
  };
396
+
397
+
328
398
  /**
329
399
  * Returns whether this field is set.
330
400
  * @return {boolean}
331
401
  */
332
- proto.clarifai.api.utils.TestProto.prototype.hasStringOneof = function () {
333
- return jspb.Message.getField(this, 5) != null;
402
+ proto.clarifai.api.utils.TestProto.prototype.hasStringOneof = function() {
403
+ return jspb.Message.getField(this, 5) != null;
334
404
  };
405
+
406
+
335
407
  /**
336
408
  * optional bool bool_oneof = 6;
337
409
  * @return {boolean}
338
410
  */
339
- proto.clarifai.api.utils.TestProto.prototype.getBoolOneof = function () {
340
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
411
+ proto.clarifai.api.utils.TestProto.prototype.getBoolOneof = function() {
412
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
341
413
  };
414
+
415
+
342
416
  /**
343
417
  * @param {boolean} value
344
418
  * @return {!proto.clarifai.api.utils.TestProto} returns this
345
419
  */
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);
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);
348
422
  };
423
+
424
+
349
425
  /**
350
426
  * Clears the field making it undefined.
351
427
  * @return {!proto.clarifai.api.utils.TestProto} returns this
352
428
  */
353
- proto.clarifai.api.utils.TestProto.prototype.clearBoolOneof = function () {
354
- return jspb.Message.setOneofField(this, 6, proto.clarifai.api.utils.TestProto.oneofGroups_[0], undefined);
429
+ proto.clarifai.api.utils.TestProto.prototype.clearBoolOneof = function() {
430
+ return jspb.Message.setOneofField(this, 6, proto.clarifai.api.utils.TestProto.oneofGroups_[0], undefined);
355
431
  };
432
+
433
+
356
434
  /**
357
435
  * Returns whether this field is set.
358
436
  * @return {boolean}
359
437
  */
360
- proto.clarifai.api.utils.TestProto.prototype.hasBoolOneof = function () {
361
- return jspb.Message.getField(this, 6) != null;
438
+ proto.clarifai.api.utils.TestProto.prototype.hasBoolOneof = function() {
439
+ return jspb.Message.getField(this, 6) != null;
362
440
  };
441
+
442
+
363
443
  /**
364
444
  * optional TestProto2 message_oneof = 7;
365
445
  * @return {?proto.clarifai.api.utils.TestProto2}
366
446
  */
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));
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));
369
450
  };
451
+
452
+
370
453
  /**
371
454
  * @param {?proto.clarifai.api.utils.TestProto2|undefined} value
372
455
  * @return {!proto.clarifai.api.utils.TestProto} returns this
373
456
  */
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);
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);
376
459
  };
460
+
461
+
377
462
  /**
378
463
  * Clears the message field making it undefined.
379
464
  * @return {!proto.clarifai.api.utils.TestProto} returns this
380
465
  */
381
- proto.clarifai.api.utils.TestProto.prototype.clearMessageOneof = function () {
382
- return this.setMessageOneof(undefined);
466
+ proto.clarifai.api.utils.TestProto.prototype.clearMessageOneof = function() {
467
+ return this.setMessageOneof(undefined);
383
468
  };
469
+
470
+
384
471
  /**
385
472
  * Returns whether this field is set.
386
473
  * @return {boolean}
387
474
  */
388
- proto.clarifai.api.utils.TestProto.prototype.hasMessageOneof = function () {
389
- return jspb.Message.getField(this, 7) != null;
475
+ proto.clarifai.api.utils.TestProto.prototype.hasMessageOneof = function() {
476
+ return jspb.Message.getField(this, 7) != null;
390
477
  };
478
+
479
+
480
+
481
+
482
+
391
483
  if (jspb.Message.GENERATE_TO_OBJECT) {
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
- };
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
+ };
426
521
  }
522
+
523
+
427
524
  /**
428
525
  * Deserializes binary data (in protobuf wire format).
429
526
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
430
527
  * @return {!proto.clarifai.api.utils.TestProto2}
431
528
  */
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);
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);
436
533
  };
534
+
535
+
437
536
  /**
438
537
  * Deserializes binary data (in protobuf wire format) from the
439
538
  * given reader into the given message object.
@@ -441,37 +540,41 @@ proto.clarifai.api.utils.TestProto2.deserializeBinary = function (bytes) {
441
540
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
442
541
  * @return {!proto.clarifai.api.utils.TestProto2}
443
542
  */
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
- }
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;
463
561
  }
464
- return msg;
562
+ }
563
+ return msg;
465
564
  };
565
+
566
+
466
567
  /**
467
568
  * Serializes the message to binary data (in protobuf wire format).
468
569
  * @return {!Uint8Array}
469
570
  */
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();
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();
474
575
  };
576
+
577
+
475
578
  /**
476
579
  * Serializes the given message to binary data (in protobuf wire
477
580
  * format), writing to the given BinaryWriter.
@@ -479,43 +582,59 @@ proto.clarifai.api.utils.TestProto2.prototype.serializeBinary = function () {
479
582
  * @param {!jspb.BinaryWriter} writer
480
583
  * @suppress {unusedLocalVariables} f is only used for nested messages
481
584
  */
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
- };
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
+
493
604
  /**
494
605
  * optional string id = 1;
495
606
  * @return {string}
496
607
  */
497
- proto.clarifai.api.utils.TestProto2.prototype.getId = function () {
498
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
608
+ proto.clarifai.api.utils.TestProto2.prototype.getId = function() {
609
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
499
610
  };
611
+
612
+
500
613
  /**
501
614
  * @param {string} value
502
615
  * @return {!proto.clarifai.api.utils.TestProto2} returns this
503
616
  */
504
- proto.clarifai.api.utils.TestProto2.prototype.setId = function (value) {
505
- return jspb.Message.setProto3StringField(this, 1, value);
617
+ proto.clarifai.api.utils.TestProto2.prototype.setId = function(value) {
618
+ return jspb.Message.setProto3StringField(this, 1, value);
506
619
  };
620
+
621
+
507
622
  /**
508
623
  * optional bool flip = 2;
509
624
  * @return {boolean}
510
625
  */
511
- proto.clarifai.api.utils.TestProto2.prototype.getFlip = function () {
512
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
626
+ proto.clarifai.api.utils.TestProto2.prototype.getFlip = function() {
627
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
513
628
  };
629
+
630
+
514
631
  /**
515
632
  * @param {boolean} value
516
633
  * @return {!proto.clarifai.api.utils.TestProto2} returns this
517
634
  */
518
- proto.clarifai.api.utils.TestProto2.prototype.setFlip = function (value) {
519
- return jspb.Message.setProto3BooleanField(this, 2, value);
635
+ proto.clarifai.api.utils.TestProto2.prototype.setFlip = function(value) {
636
+ return jspb.Message.setProto3BooleanField(this, 2, value);
520
637
  };
638
+
639
+
521
640
  goog.object.extend(exports, proto.clarifai.api.utils);