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