clarifai-web-grpc 5.1.0 → 9.6.1

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 (78) hide show
  1. package/.github/workflows/ci.yml +15 -8
  2. package/README.md +6 -0
  3. package/VERSION +1 -1
  4. package/package.json +2 -23
  5. package/proto/clarifai/api/resources_pb.d.ts +635 -34
  6. package/proto/clarifai/api/resources_pb.js +5808 -989
  7. package/proto/clarifai/api/service_grpc_web_pb.d.ts +168 -12
  8. package/proto/clarifai/api/service_grpc_web_pb.js +876 -79
  9. package/proto/clarifai/api/service_pb.d.ts +634 -54
  10. package/proto/clarifai/api/service_pb.js +5671 -739
  11. package/proto/clarifai/api/status/status_code_pb.d.ts +17 -1
  12. package/proto/clarifai/api/status/status_code_pb.js +17 -1
  13. package/.husky/commit-msg +0 -4
  14. package/CHANGELOG.md +0 -7
  15. package/dist/cjs/google/api/annotations_pb.d.ts +0 -1
  16. package/dist/cjs/google/api/annotations_pb.js +0 -32
  17. package/dist/cjs/google/api/http_pb.d.ts +0 -1
  18. package/dist/cjs/google/api/http_pb.js +0 -813
  19. package/dist/cjs/index.d.ts +0 -7
  20. package/dist/cjs/proto/clarifai/api/resources_pb.d.ts +0 -1
  21. package/dist/cjs/proto/clarifai/api/resources_pb.js +0 -45222
  22. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.d.ts +0 -5
  23. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.js +0 -8217
  24. package/dist/cjs/proto/clarifai/api/service_pb.d.ts +0 -1
  25. package/dist/cjs/proto/clarifai/api/service_pb.js +0 -58616
  26. package/dist/cjs/proto/clarifai/api/status/status_code_pb.d.ts +0 -1
  27. package/dist/cjs/proto/clarifai/api/status/status_code_pb.js +0 -354
  28. package/dist/cjs/proto/clarifai/api/status/status_pb.d.ts +0 -1
  29. package/dist/cjs/proto/clarifai/api/status/status_pb.js +0 -717
  30. package/dist/cjs/proto/clarifai/api/utils/extensions_pb.d.ts +0 -1
  31. package/dist/cjs/proto/clarifai/api/utils/extensions_pb.js +0 -60
  32. package/dist/cjs/proto/clarifai/api/utils/matrix_pb.d.ts +0 -1
  33. package/dist/cjs/proto/clarifai/api/utils/matrix_pb.js +0 -197
  34. package/dist/cjs/proto/clarifai/api/utils/test_proto_pb.d.ts +0 -1
  35. package/dist/cjs/proto/clarifai/api/utils/test_proto_pb.js +0 -529
  36. package/dist/cjs/proto/clarifai/auth/scope/scope_pb.d.ts +0 -1
  37. package/dist/cjs/proto/clarifai/auth/scope/scope_pb.js +0 -327
  38. package/dist/cjs/proto/clarifai/auth/types/types_pb.d.ts +0 -1
  39. package/dist/cjs/proto/clarifai/auth/types/types_pb.js +0 -34
  40. package/dist/cjs/proto/clarifai/auth/util/extension_pb.d.ts +0 -1
  41. package/dist/cjs/proto/clarifai/auth/util/extension_pb.js +0 -88
  42. package/dist/cjs/resources.d.ts +0 -1
  43. package/dist/cjs/resources.js +0 -13
  44. package/dist/cjs/service.d.ts +0 -1
  45. package/dist/cjs/service.js +0 -13
  46. package/dist/esm/google/api/annotations_pb.d.ts +0 -1
  47. package/dist/esm/google/api/annotations_pb.js +0 -32
  48. package/dist/esm/google/api/http_pb.d.ts +0 -1
  49. package/dist/esm/google/api/http_pb.js +0 -813
  50. package/dist/esm/index.d.ts +0 -7
  51. package/dist/esm/index.js +0 -9
  52. package/dist/esm/proto/clarifai/api/resources_pb.d.ts +0 -1
  53. package/dist/esm/proto/clarifai/api/resources_pb.js +0 -45222
  54. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.d.ts +0 -5
  55. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.js +0 -8217
  56. package/dist/esm/proto/clarifai/api/service_pb.d.ts +0 -1
  57. package/dist/esm/proto/clarifai/api/service_pb.js +0 -58616
  58. package/dist/esm/proto/clarifai/api/status/status_code_pb.d.ts +0 -1
  59. package/dist/esm/proto/clarifai/api/status/status_code_pb.js +0 -354
  60. package/dist/esm/proto/clarifai/api/status/status_pb.d.ts +0 -1
  61. package/dist/esm/proto/clarifai/api/status/status_pb.js +0 -717
  62. package/dist/esm/proto/clarifai/api/utils/extensions_pb.d.ts +0 -1
  63. package/dist/esm/proto/clarifai/api/utils/extensions_pb.js +0 -60
  64. package/dist/esm/proto/clarifai/api/utils/matrix_pb.d.ts +0 -1
  65. package/dist/esm/proto/clarifai/api/utils/matrix_pb.js +0 -197
  66. package/dist/esm/proto/clarifai/api/utils/test_proto_pb.d.ts +0 -1
  67. package/dist/esm/proto/clarifai/api/utils/test_proto_pb.js +0 -529
  68. package/dist/esm/proto/clarifai/auth/scope/scope_pb.d.ts +0 -1
  69. package/dist/esm/proto/clarifai/auth/scope/scope_pb.js +0 -327
  70. package/dist/esm/proto/clarifai/auth/types/types_pb.d.ts +0 -1
  71. package/dist/esm/proto/clarifai/auth/types/types_pb.js +0 -34
  72. package/dist/esm/proto/clarifai/auth/util/extension_pb.d.ts +0 -1
  73. package/dist/esm/proto/clarifai/auth/util/extension_pb.js +0 -88
  74. package/dist/esm/resources.d.ts +0 -1
  75. package/dist/esm/resources.js +0 -1
  76. package/dist/esm/service.d.ts +0 -1
  77. package/dist/esm/service.js +0 -1
  78. package/package.json-E +0 -52
@@ -1,717 +0,0 @@
1
- "use strict";
2
- // source: proto/clarifai/api/status/status.proto
3
- /**
4
- * @fileoverview
5
- * @enhanceable
6
- * @suppress {missingRequire} reports error on implicit type usages.
7
- * @suppress {messageConventions} JS Compiler reports an error if a variable or
8
- * field starts with 'MSG_' and isn't a translatable message.
9
- * @public
10
- */
11
- // GENERATED CODE -- DO NOT EDIT!
12
- /* eslint-disable */
13
- // @ts-nocheck
14
- var jspb = require('google-protobuf');
15
- var goog = jspb;
16
- var global = (typeof globalThis !== 'undefined' && globalThis) ||
17
- (typeof window !== 'undefined' && window) ||
18
- (typeof global !== 'undefined' && global) ||
19
- (typeof self !== 'undefined' && self) ||
20
- (function () { return this; }).call(null) ||
21
- Function('return this')();
22
- var proto_clarifai_auth_util_extension_pb = require('../../../../proto/clarifai/auth/util/extension_pb.js');
23
- goog.object.extend(proto, proto_clarifai_auth_util_extension_pb);
24
- var proto_clarifai_api_status_status_code_pb = require('../../../../proto/clarifai/api/status/status_code_pb.js');
25
- goog.object.extend(proto, proto_clarifai_api_status_status_code_pb);
26
- goog.exportSymbol('proto.clarifai.api.status.BaseResponse', null, global);
27
- goog.exportSymbol('proto.clarifai.api.status.RedirectInfo', null, global);
28
- goog.exportSymbol('proto.clarifai.api.status.Status', null, global);
29
- /**
30
- * Generated by JsPbCodeGenerator.
31
- * @param {Array=} opt_data Optional initial data array, typically from a
32
- * server response, or constructed directly in Javascript. The array is used
33
- * in place and becomes part of the constructed object. It is not cloned.
34
- * If no data is provided, the constructed object will be empty, but still
35
- * valid.
36
- * @extends {jspb.Message}
37
- * @constructor
38
- */
39
- proto.clarifai.api.status.Status = function (opt_data) {
40
- jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.status.Status.repeatedFields_, null);
41
- };
42
- goog.inherits(proto.clarifai.api.status.Status, jspb.Message);
43
- if (goog.DEBUG && !COMPILED) {
44
- /**
45
- * @public
46
- * @override
47
- */
48
- proto.clarifai.api.status.Status.displayName = 'proto.clarifai.api.status.Status';
49
- }
50
- /**
51
- * Generated by JsPbCodeGenerator.
52
- * @param {Array=} opt_data Optional initial data array, typically from a
53
- * server response, or constructed directly in Javascript. The array is used
54
- * in place and becomes part of the constructed object. It is not cloned.
55
- * If no data is provided, the constructed object will be empty, but still
56
- * valid.
57
- * @extends {jspb.Message}
58
- * @constructor
59
- */
60
- proto.clarifai.api.status.RedirectInfo = function (opt_data) {
61
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
62
- };
63
- goog.inherits(proto.clarifai.api.status.RedirectInfo, jspb.Message);
64
- if (goog.DEBUG && !COMPILED) {
65
- /**
66
- * @public
67
- * @override
68
- */
69
- proto.clarifai.api.status.RedirectInfo.displayName = 'proto.clarifai.api.status.RedirectInfo';
70
- }
71
- /**
72
- * Generated by JsPbCodeGenerator.
73
- * @param {Array=} opt_data Optional initial data array, typically from a
74
- * server response, or constructed directly in Javascript. The array is used
75
- * in place and becomes part of the constructed object. It is not cloned.
76
- * If no data is provided, the constructed object will be empty, but still
77
- * valid.
78
- * @extends {jspb.Message}
79
- * @constructor
80
- */
81
- proto.clarifai.api.status.BaseResponse = function (opt_data) {
82
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
83
- };
84
- goog.inherits(proto.clarifai.api.status.BaseResponse, jspb.Message);
85
- if (goog.DEBUG && !COMPILED) {
86
- /**
87
- * @public
88
- * @override
89
- */
90
- proto.clarifai.api.status.BaseResponse.displayName = 'proto.clarifai.api.status.BaseResponse';
91
- }
92
- /**
93
- * List of repeated fields within this message type.
94
- * @private {!Array<number>}
95
- * @const
96
- */
97
- proto.clarifai.api.status.Status.repeatedFields_ = [4];
98
- if (jspb.Message.GENERATE_TO_OBJECT) {
99
- /**
100
- * Creates an object representation of this proto.
101
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
102
- * Optional fields that are not set will be set to undefined.
103
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
104
- * For the list of reserved names please see:
105
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
106
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
107
- * JSPB instance for transitional soy proto support:
108
- * http://goto/soy-param-migration
109
- * @return {!Object}
110
- */
111
- proto.clarifai.api.status.Status.prototype.toObject = function (opt_includeInstance) {
112
- return proto.clarifai.api.status.Status.toObject(opt_includeInstance, this);
113
- };
114
- /**
115
- * Static version of the {@see toObject} method.
116
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
117
- * the JSPB instance for transitional soy proto support:
118
- * http://goto/soy-param-migration
119
- * @param {!proto.clarifai.api.status.Status} msg The msg instance to transform.
120
- * @return {!Object}
121
- * @suppress {unusedLocalVariables} f is only used for nested messages
122
- */
123
- proto.clarifai.api.status.Status.toObject = function (includeInstance, msg) {
124
- var f, obj = {
125
- code: jspb.Message.getFieldWithDefault(msg, 1, 0),
126
- description: jspb.Message.getFieldWithDefault(msg, 2, ""),
127
- details: jspb.Message.getFieldWithDefault(msg, 3, ""),
128
- stackTraceList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
129
- percentCompleted: jspb.Message.getFieldWithDefault(msg, 5, 0),
130
- timeRemaining: jspb.Message.getFieldWithDefault(msg, 6, 0),
131
- reqId: jspb.Message.getFieldWithDefault(msg, 7, ""),
132
- internalDetails: jspb.Message.getFieldWithDefault(msg, 8, ""),
133
- redirectInfo: (f = msg.getRedirectInfo()) && proto.clarifai.api.status.RedirectInfo.toObject(includeInstance, f)
134
- };
135
- if (includeInstance) {
136
- obj.$jspbMessageInstance = msg;
137
- }
138
- return obj;
139
- };
140
- }
141
- /**
142
- * Deserializes binary data (in protobuf wire format).
143
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
144
- * @return {!proto.clarifai.api.status.Status}
145
- */
146
- proto.clarifai.api.status.Status.deserializeBinary = function (bytes) {
147
- var reader = new jspb.BinaryReader(bytes);
148
- var msg = new proto.clarifai.api.status.Status;
149
- return proto.clarifai.api.status.Status.deserializeBinaryFromReader(msg, reader);
150
- };
151
- /**
152
- * Deserializes binary data (in protobuf wire format) from the
153
- * given reader into the given message object.
154
- * @param {!proto.clarifai.api.status.Status} msg The message object to deserialize into.
155
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
156
- * @return {!proto.clarifai.api.status.Status}
157
- */
158
- proto.clarifai.api.status.Status.deserializeBinaryFromReader = function (msg, reader) {
159
- while (reader.nextField()) {
160
- if (reader.isEndGroup()) {
161
- break;
162
- }
163
- var field = reader.getFieldNumber();
164
- switch (field) {
165
- case 1:
166
- var value = /** @type {!proto.clarifai.api.status.StatusCode} */ (reader.readEnum());
167
- msg.setCode(value);
168
- break;
169
- case 2:
170
- var value = /** @type {string} */ (reader.readString());
171
- msg.setDescription(value);
172
- break;
173
- case 3:
174
- var value = /** @type {string} */ (reader.readString());
175
- msg.setDetails(value);
176
- break;
177
- case 4:
178
- var value = /** @type {string} */ (reader.readString());
179
- msg.addStackTrace(value);
180
- break;
181
- case 5:
182
- var value = /** @type {number} */ (reader.readUint32());
183
- msg.setPercentCompleted(value);
184
- break;
185
- case 6:
186
- var value = /** @type {number} */ (reader.readUint32());
187
- msg.setTimeRemaining(value);
188
- break;
189
- case 7:
190
- var value = /** @type {string} */ (reader.readString());
191
- msg.setReqId(value);
192
- break;
193
- case 8:
194
- var value = /** @type {string} */ (reader.readString());
195
- msg.setInternalDetails(value);
196
- break;
197
- case 9:
198
- var value = new proto.clarifai.api.status.RedirectInfo;
199
- reader.readMessage(value, proto.clarifai.api.status.RedirectInfo.deserializeBinaryFromReader);
200
- msg.setRedirectInfo(value);
201
- break;
202
- default:
203
- reader.skipField();
204
- break;
205
- }
206
- }
207
- return msg;
208
- };
209
- /**
210
- * Serializes the message to binary data (in protobuf wire format).
211
- * @return {!Uint8Array}
212
- */
213
- proto.clarifai.api.status.Status.prototype.serializeBinary = function () {
214
- var writer = new jspb.BinaryWriter();
215
- proto.clarifai.api.status.Status.serializeBinaryToWriter(this, writer);
216
- return writer.getResultBuffer();
217
- };
218
- /**
219
- * Serializes the given message to binary data (in protobuf wire
220
- * format), writing to the given BinaryWriter.
221
- * @param {!proto.clarifai.api.status.Status} message
222
- * @param {!jspb.BinaryWriter} writer
223
- * @suppress {unusedLocalVariables} f is only used for nested messages
224
- */
225
- proto.clarifai.api.status.Status.serializeBinaryToWriter = function (message, writer) {
226
- var f = undefined;
227
- f = message.getCode();
228
- if (f !== 0.0) {
229
- writer.writeEnum(1, f);
230
- }
231
- f = message.getDescription();
232
- if (f.length > 0) {
233
- writer.writeString(2, f);
234
- }
235
- f = message.getDetails();
236
- if (f.length > 0) {
237
- writer.writeString(3, f);
238
- }
239
- f = message.getStackTraceList();
240
- if (f.length > 0) {
241
- writer.writeRepeatedString(4, f);
242
- }
243
- f = message.getPercentCompleted();
244
- if (f !== 0) {
245
- writer.writeUint32(5, f);
246
- }
247
- f = message.getTimeRemaining();
248
- if (f !== 0) {
249
- writer.writeUint32(6, f);
250
- }
251
- f = message.getReqId();
252
- if (f.length > 0) {
253
- writer.writeString(7, f);
254
- }
255
- f = message.getInternalDetails();
256
- if (f.length > 0) {
257
- writer.writeString(8, f);
258
- }
259
- f = message.getRedirectInfo();
260
- if (f != null) {
261
- writer.writeMessage(9, f, proto.clarifai.api.status.RedirectInfo.serializeBinaryToWriter);
262
- }
263
- };
264
- /**
265
- * optional StatusCode code = 1;
266
- * @return {!proto.clarifai.api.status.StatusCode}
267
- */
268
- proto.clarifai.api.status.Status.prototype.getCode = function () {
269
- return /** @type {!proto.clarifai.api.status.StatusCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
270
- };
271
- /**
272
- * @param {!proto.clarifai.api.status.StatusCode} value
273
- * @return {!proto.clarifai.api.status.Status} returns this
274
- */
275
- proto.clarifai.api.status.Status.prototype.setCode = function (value) {
276
- return jspb.Message.setProto3EnumField(this, 1, value);
277
- };
278
- /**
279
- * optional string description = 2;
280
- * @return {string}
281
- */
282
- proto.clarifai.api.status.Status.prototype.getDescription = function () {
283
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
284
- };
285
- /**
286
- * @param {string} value
287
- * @return {!proto.clarifai.api.status.Status} returns this
288
- */
289
- proto.clarifai.api.status.Status.prototype.setDescription = function (value) {
290
- return jspb.Message.setProto3StringField(this, 2, value);
291
- };
292
- /**
293
- * optional string details = 3;
294
- * @return {string}
295
- */
296
- proto.clarifai.api.status.Status.prototype.getDetails = function () {
297
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
298
- };
299
- /**
300
- * @param {string} value
301
- * @return {!proto.clarifai.api.status.Status} returns this
302
- */
303
- proto.clarifai.api.status.Status.prototype.setDetails = function (value) {
304
- return jspb.Message.setProto3StringField(this, 3, value);
305
- };
306
- /**
307
- * repeated string stack_trace = 4;
308
- * @return {!Array<string>}
309
- */
310
- proto.clarifai.api.status.Status.prototype.getStackTraceList = function () {
311
- return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
312
- };
313
- /**
314
- * @param {!Array<string>} value
315
- * @return {!proto.clarifai.api.status.Status} returns this
316
- */
317
- proto.clarifai.api.status.Status.prototype.setStackTraceList = function (value) {
318
- return jspb.Message.setField(this, 4, value || []);
319
- };
320
- /**
321
- * @param {string} value
322
- * @param {number=} opt_index
323
- * @return {!proto.clarifai.api.status.Status} returns this
324
- */
325
- proto.clarifai.api.status.Status.prototype.addStackTrace = function (value, opt_index) {
326
- return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
327
- };
328
- /**
329
- * Clears the list making it empty but non-null.
330
- * @return {!proto.clarifai.api.status.Status} returns this
331
- */
332
- proto.clarifai.api.status.Status.prototype.clearStackTraceList = function () {
333
- return this.setStackTraceList([]);
334
- };
335
- /**
336
- * optional uint32 percent_completed = 5;
337
- * @return {number}
338
- */
339
- proto.clarifai.api.status.Status.prototype.getPercentCompleted = function () {
340
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
341
- };
342
- /**
343
- * @param {number} value
344
- * @return {!proto.clarifai.api.status.Status} returns this
345
- */
346
- proto.clarifai.api.status.Status.prototype.setPercentCompleted = function (value) {
347
- return jspb.Message.setProto3IntField(this, 5, value);
348
- };
349
- /**
350
- * optional uint32 time_remaining = 6;
351
- * @return {number}
352
- */
353
- proto.clarifai.api.status.Status.prototype.getTimeRemaining = function () {
354
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
355
- };
356
- /**
357
- * @param {number} value
358
- * @return {!proto.clarifai.api.status.Status} returns this
359
- */
360
- proto.clarifai.api.status.Status.prototype.setTimeRemaining = function (value) {
361
- return jspb.Message.setProto3IntField(this, 6, value);
362
- };
363
- /**
364
- * optional string req_id = 7;
365
- * @return {string}
366
- */
367
- proto.clarifai.api.status.Status.prototype.getReqId = function () {
368
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
369
- };
370
- /**
371
- * @param {string} value
372
- * @return {!proto.clarifai.api.status.Status} returns this
373
- */
374
- proto.clarifai.api.status.Status.prototype.setReqId = function (value) {
375
- return jspb.Message.setProto3StringField(this, 7, value);
376
- };
377
- /**
378
- * optional string internal_details = 8;
379
- * @return {string}
380
- */
381
- proto.clarifai.api.status.Status.prototype.getInternalDetails = function () {
382
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
383
- };
384
- /**
385
- * @param {string} value
386
- * @return {!proto.clarifai.api.status.Status} returns this
387
- */
388
- proto.clarifai.api.status.Status.prototype.setInternalDetails = function (value) {
389
- return jspb.Message.setProto3StringField(this, 8, value);
390
- };
391
- /**
392
- * optional RedirectInfo redirect_info = 9;
393
- * @return {?proto.clarifai.api.status.RedirectInfo}
394
- */
395
- proto.clarifai.api.status.Status.prototype.getRedirectInfo = function () {
396
- return /** @type{?proto.clarifai.api.status.RedirectInfo} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.status.RedirectInfo, 9));
397
- };
398
- /**
399
- * @param {?proto.clarifai.api.status.RedirectInfo|undefined} value
400
- * @return {!proto.clarifai.api.status.Status} returns this
401
- */
402
- proto.clarifai.api.status.Status.prototype.setRedirectInfo = function (value) {
403
- return jspb.Message.setWrapperField(this, 9, value);
404
- };
405
- /**
406
- * Clears the message field making it undefined.
407
- * @return {!proto.clarifai.api.status.Status} returns this
408
- */
409
- proto.clarifai.api.status.Status.prototype.clearRedirectInfo = function () {
410
- return this.setRedirectInfo(undefined);
411
- };
412
- /**
413
- * Returns whether this field is set.
414
- * @return {boolean}
415
- */
416
- proto.clarifai.api.status.Status.prototype.hasRedirectInfo = function () {
417
- return jspb.Message.getField(this, 9) != null;
418
- };
419
- if (jspb.Message.GENERATE_TO_OBJECT) {
420
- /**
421
- * Creates an object representation of this proto.
422
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
423
- * Optional fields that are not set will be set to undefined.
424
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
425
- * For the list of reserved names please see:
426
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
427
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
428
- * JSPB instance for transitional soy proto support:
429
- * http://goto/soy-param-migration
430
- * @return {!Object}
431
- */
432
- proto.clarifai.api.status.RedirectInfo.prototype.toObject = function (opt_includeInstance) {
433
- return proto.clarifai.api.status.RedirectInfo.toObject(opt_includeInstance, this);
434
- };
435
- /**
436
- * Static version of the {@see toObject} method.
437
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
438
- * the JSPB instance for transitional soy proto support:
439
- * http://goto/soy-param-migration
440
- * @param {!proto.clarifai.api.status.RedirectInfo} msg The msg instance to transform.
441
- * @return {!Object}
442
- * @suppress {unusedLocalVariables} f is only used for nested messages
443
- */
444
- proto.clarifai.api.status.RedirectInfo.toObject = function (includeInstance, msg) {
445
- var f, obj = {
446
- url: jspb.Message.getFieldWithDefault(msg, 1, ""),
447
- resourceType: jspb.Message.getFieldWithDefault(msg, 2, ""),
448
- oldResourceId: jspb.Message.getFieldWithDefault(msg, 3, ""),
449
- newResourceId: jspb.Message.getFieldWithDefault(msg, 4, "")
450
- };
451
- if (includeInstance) {
452
- obj.$jspbMessageInstance = msg;
453
- }
454
- return obj;
455
- };
456
- }
457
- /**
458
- * Deserializes binary data (in protobuf wire format).
459
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
460
- * @return {!proto.clarifai.api.status.RedirectInfo}
461
- */
462
- proto.clarifai.api.status.RedirectInfo.deserializeBinary = function (bytes) {
463
- var reader = new jspb.BinaryReader(bytes);
464
- var msg = new proto.clarifai.api.status.RedirectInfo;
465
- return proto.clarifai.api.status.RedirectInfo.deserializeBinaryFromReader(msg, reader);
466
- };
467
- /**
468
- * Deserializes binary data (in protobuf wire format) from the
469
- * given reader into the given message object.
470
- * @param {!proto.clarifai.api.status.RedirectInfo} msg The message object to deserialize into.
471
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
472
- * @return {!proto.clarifai.api.status.RedirectInfo}
473
- */
474
- proto.clarifai.api.status.RedirectInfo.deserializeBinaryFromReader = function (msg, reader) {
475
- while (reader.nextField()) {
476
- if (reader.isEndGroup()) {
477
- break;
478
- }
479
- var field = reader.getFieldNumber();
480
- switch (field) {
481
- case 1:
482
- var value = /** @type {string} */ (reader.readString());
483
- msg.setUrl(value);
484
- break;
485
- case 2:
486
- var value = /** @type {string} */ (reader.readString());
487
- msg.setResourceType(value);
488
- break;
489
- case 3:
490
- var value = /** @type {string} */ (reader.readString());
491
- msg.setOldResourceId(value);
492
- break;
493
- case 4:
494
- var value = /** @type {string} */ (reader.readString());
495
- msg.setNewResourceId(value);
496
- break;
497
- default:
498
- reader.skipField();
499
- break;
500
- }
501
- }
502
- return msg;
503
- };
504
- /**
505
- * Serializes the message to binary data (in protobuf wire format).
506
- * @return {!Uint8Array}
507
- */
508
- proto.clarifai.api.status.RedirectInfo.prototype.serializeBinary = function () {
509
- var writer = new jspb.BinaryWriter();
510
- proto.clarifai.api.status.RedirectInfo.serializeBinaryToWriter(this, writer);
511
- return writer.getResultBuffer();
512
- };
513
- /**
514
- * Serializes the given message to binary data (in protobuf wire
515
- * format), writing to the given BinaryWriter.
516
- * @param {!proto.clarifai.api.status.RedirectInfo} message
517
- * @param {!jspb.BinaryWriter} writer
518
- * @suppress {unusedLocalVariables} f is only used for nested messages
519
- */
520
- proto.clarifai.api.status.RedirectInfo.serializeBinaryToWriter = function (message, writer) {
521
- var f = undefined;
522
- f = message.getUrl();
523
- if (f.length > 0) {
524
- writer.writeString(1, f);
525
- }
526
- f = message.getResourceType();
527
- if (f.length > 0) {
528
- writer.writeString(2, f);
529
- }
530
- f = message.getOldResourceId();
531
- if (f.length > 0) {
532
- writer.writeString(3, f);
533
- }
534
- f = message.getNewResourceId();
535
- if (f.length > 0) {
536
- writer.writeString(4, f);
537
- }
538
- };
539
- /**
540
- * optional string url = 1;
541
- * @return {string}
542
- */
543
- proto.clarifai.api.status.RedirectInfo.prototype.getUrl = function () {
544
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
545
- };
546
- /**
547
- * @param {string} value
548
- * @return {!proto.clarifai.api.status.RedirectInfo} returns this
549
- */
550
- proto.clarifai.api.status.RedirectInfo.prototype.setUrl = function (value) {
551
- return jspb.Message.setProto3StringField(this, 1, value);
552
- };
553
- /**
554
- * optional string resource_type = 2;
555
- * @return {string}
556
- */
557
- proto.clarifai.api.status.RedirectInfo.prototype.getResourceType = function () {
558
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
559
- };
560
- /**
561
- * @param {string} value
562
- * @return {!proto.clarifai.api.status.RedirectInfo} returns this
563
- */
564
- proto.clarifai.api.status.RedirectInfo.prototype.setResourceType = function (value) {
565
- return jspb.Message.setProto3StringField(this, 2, value);
566
- };
567
- /**
568
- * optional string old_resource_id = 3;
569
- * @return {string}
570
- */
571
- proto.clarifai.api.status.RedirectInfo.prototype.getOldResourceId = function () {
572
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
573
- };
574
- /**
575
- * @param {string} value
576
- * @return {!proto.clarifai.api.status.RedirectInfo} returns this
577
- */
578
- proto.clarifai.api.status.RedirectInfo.prototype.setOldResourceId = function (value) {
579
- return jspb.Message.setProto3StringField(this, 3, value);
580
- };
581
- /**
582
- * optional string new_resource_id = 4;
583
- * @return {string}
584
- */
585
- proto.clarifai.api.status.RedirectInfo.prototype.getNewResourceId = function () {
586
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
587
- };
588
- /**
589
- * @param {string} value
590
- * @return {!proto.clarifai.api.status.RedirectInfo} returns this
591
- */
592
- proto.clarifai.api.status.RedirectInfo.prototype.setNewResourceId = function (value) {
593
- return jspb.Message.setProto3StringField(this, 4, value);
594
- };
595
- if (jspb.Message.GENERATE_TO_OBJECT) {
596
- /**
597
- * Creates an object representation of this proto.
598
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
599
- * Optional fields that are not set will be set to undefined.
600
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
601
- * For the list of reserved names please see:
602
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
603
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
604
- * JSPB instance for transitional soy proto support:
605
- * http://goto/soy-param-migration
606
- * @return {!Object}
607
- */
608
- proto.clarifai.api.status.BaseResponse.prototype.toObject = function (opt_includeInstance) {
609
- return proto.clarifai.api.status.BaseResponse.toObject(opt_includeInstance, this);
610
- };
611
- /**
612
- * Static version of the {@see toObject} method.
613
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
614
- * the JSPB instance for transitional soy proto support:
615
- * http://goto/soy-param-migration
616
- * @param {!proto.clarifai.api.status.BaseResponse} msg The msg instance to transform.
617
- * @return {!Object}
618
- * @suppress {unusedLocalVariables} f is only used for nested messages
619
- */
620
- proto.clarifai.api.status.BaseResponse.toObject = function (includeInstance, msg) {
621
- var f, obj = {
622
- status: (f = msg.getStatus()) && proto.clarifai.api.status.Status.toObject(includeInstance, f)
623
- };
624
- if (includeInstance) {
625
- obj.$jspbMessageInstance = msg;
626
- }
627
- return obj;
628
- };
629
- }
630
- /**
631
- * Deserializes binary data (in protobuf wire format).
632
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
633
- * @return {!proto.clarifai.api.status.BaseResponse}
634
- */
635
- proto.clarifai.api.status.BaseResponse.deserializeBinary = function (bytes) {
636
- var reader = new jspb.BinaryReader(bytes);
637
- var msg = new proto.clarifai.api.status.BaseResponse;
638
- return proto.clarifai.api.status.BaseResponse.deserializeBinaryFromReader(msg, reader);
639
- };
640
- /**
641
- * Deserializes binary data (in protobuf wire format) from the
642
- * given reader into the given message object.
643
- * @param {!proto.clarifai.api.status.BaseResponse} msg The message object to deserialize into.
644
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
645
- * @return {!proto.clarifai.api.status.BaseResponse}
646
- */
647
- proto.clarifai.api.status.BaseResponse.deserializeBinaryFromReader = function (msg, reader) {
648
- while (reader.nextField()) {
649
- if (reader.isEndGroup()) {
650
- break;
651
- }
652
- var field = reader.getFieldNumber();
653
- switch (field) {
654
- case 1:
655
- var value = new proto.clarifai.api.status.Status;
656
- reader.readMessage(value, proto.clarifai.api.status.Status.deserializeBinaryFromReader);
657
- msg.setStatus(value);
658
- break;
659
- default:
660
- reader.skipField();
661
- break;
662
- }
663
- }
664
- return msg;
665
- };
666
- /**
667
- * Serializes the message to binary data (in protobuf wire format).
668
- * @return {!Uint8Array}
669
- */
670
- proto.clarifai.api.status.BaseResponse.prototype.serializeBinary = function () {
671
- var writer = new jspb.BinaryWriter();
672
- proto.clarifai.api.status.BaseResponse.serializeBinaryToWriter(this, writer);
673
- return writer.getResultBuffer();
674
- };
675
- /**
676
- * Serializes the given message to binary data (in protobuf wire
677
- * format), writing to the given BinaryWriter.
678
- * @param {!proto.clarifai.api.status.BaseResponse} message
679
- * @param {!jspb.BinaryWriter} writer
680
- * @suppress {unusedLocalVariables} f is only used for nested messages
681
- */
682
- proto.clarifai.api.status.BaseResponse.serializeBinaryToWriter = function (message, writer) {
683
- var f = undefined;
684
- f = message.getStatus();
685
- if (f != null) {
686
- writer.writeMessage(1, f, proto.clarifai.api.status.Status.serializeBinaryToWriter);
687
- }
688
- };
689
- /**
690
- * optional Status status = 1;
691
- * @return {?proto.clarifai.api.status.Status}
692
- */
693
- proto.clarifai.api.status.BaseResponse.prototype.getStatus = function () {
694
- return /** @type{?proto.clarifai.api.status.Status} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.status.Status, 1));
695
- };
696
- /**
697
- * @param {?proto.clarifai.api.status.Status|undefined} value
698
- * @return {!proto.clarifai.api.status.BaseResponse} returns this
699
- */
700
- proto.clarifai.api.status.BaseResponse.prototype.setStatus = function (value) {
701
- return jspb.Message.setWrapperField(this, 1, value);
702
- };
703
- /**
704
- * Clears the message field making it undefined.
705
- * @return {!proto.clarifai.api.status.BaseResponse} returns this
706
- */
707
- proto.clarifai.api.status.BaseResponse.prototype.clearStatus = function () {
708
- return this.setStatus(undefined);
709
- };
710
- /**
711
- * Returns whether this field is set.
712
- * @return {boolean}
713
- */
714
- proto.clarifai.api.status.BaseResponse.prototype.hasStatus = function () {
715
- return jspb.Message.getField(this, 1) != null;
716
- };
717
- goog.object.extend(exports, proto.clarifai.api.status);