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.
- package/CHANGELOG.md +2 -2
- package/lib/google/api/annotations_grpc_pb.js +1 -2
- package/lib/google/api/annotations_pb.js +19 -4
- package/lib/google/api/http_grpc_pb.js +1 -2
- package/lib/google/api/http_pb.js +606 -414
- package/lib/proto/clarifai/api/resources_pb.d.ts +5052 -1
- package/lib/proto/clarifai/api/resources_pb.js +26126 -17879
- package/lib/proto/clarifai/api/serviceServiceClientPb.ts +3002 -0
- package/lib/proto/clarifai/api/service_pb.d.ts +5582 -1
- package/lib/proto/clarifai/api/service_pb.js +30050 -20944
- package/lib/proto/clarifai/api/status/status_code_pb.d.ts +296 -1
- package/lib/proto/clarifai/api/status/status_code_pb.js +295 -293
- package/lib/proto/clarifai/api/status/status_pb.d.ts +73 -1
- package/lib/proto/clarifai/api/status/status_pb.js +357 -250
- package/lib/proto/clarifai/api/utils/extensions_pb.d.ts +4 -1
- package/lib/proto/clarifai/api/utils/extensions_pb.js +53 -10
- package/lib/proto/clarifai/api/utils/test_proto_pb.d.ts +81 -1
- package/lib/proto/clarifai/api/utils/test_proto_pb.js +385 -266
- package/lib/proto/clarifai/auth/scope/scope_pb.d.ts +92 -1
- package/lib/proto/clarifai/auth/scope/scope_pb.js +232 -163
- package/lib/proto/clarifai/auth/types/types_pb.d.ts +10 -1
- package/lib/proto/clarifai/auth/types/types_pb.js +9 -7
- package/lib/proto/clarifai/auth/util/extension_pb.d.ts +6 -1
- package/lib/proto/clarifai/auth/util/extension_pb.js +87 -16
- package/package.json +15 -24
- package/tests/basic.test.ts +4 -30
- package/tests/helpers.test.ts +25 -41
- package/tsconfig.json +5 -4
- package/dist/google/api/annotations_grpc_pb.d.ts +0 -0
- package/dist/google/api/annotations_grpc_pb.js +0 -2
- package/dist/google/api/annotations_pb.d.ts +0 -1
- package/dist/google/api/annotations_pb.js +0 -32
- package/dist/google/api/http_grpc_pb.d.ts +0 -0
- package/dist/google/api/http_grpc_pb.js +0 -2
- package/dist/google/api/http_pb.d.ts +0 -1
- package/dist/google/api/http_pb.js +0 -813
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -11
- package/dist/proto/clarifai/api/resources_pb.d.ts +0 -1
- package/dist/proto/clarifai/api/resources_pb.js +0 -32957
- package/dist/proto/clarifai/api/serviceServiceClientPb.d.ts +0 -275
- package/dist/proto/clarifai/api/serviceServiceClientPb.js +0 -908
- package/dist/proto/clarifai/api/service_pb.d.ts +0 -1
- package/dist/proto/clarifai/api/service_pb.js +0 -38791
- package/dist/proto/clarifai/api/status/status_code_pb.d.ts +0 -1
- package/dist/proto/clarifai/api/status/status_code_pb.js +0 -312
- package/dist/proto/clarifai/api/status/status_pb.d.ts +0 -1
- package/dist/proto/clarifai/api/status/status_pb.js +0 -473
- package/dist/proto/clarifai/api/utils/extensions_pb.d.ts +0 -1
- package/dist/proto/clarifai/api/utils/extensions_pb.js +0 -52
- package/dist/proto/clarifai/api/utils/test_proto_pb.d.ts +0 -1
- package/dist/proto/clarifai/api/utils/test_proto_pb.js +0 -521
- package/dist/proto/clarifai/auth/scope/scope_pb.d.ts +0 -1
- package/dist/proto/clarifai/auth/scope/scope_pb.js +0 -294
- package/dist/proto/clarifai/auth/types/types_pb.d.ts +0 -1
- package/dist/proto/clarifai/auth/types/types_pb.js +0 -26
- package/dist/proto/clarifai/auth/util/extension_pb.d.ts +0 -1
- package/dist/proto/clarifai/auth/util/extension_pb.js +0 -80
- package/dist/resources.d.ts +0 -12
- package/dist/resources.js +0 -47
- package/dist/service.d.ts +0 -1
- package/dist/service.js +0 -13
- package/tsconfig.cjs.json +0 -7
|
@@ -1,521 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// source: proto/clarifai/api/utils/test_proto.proto
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview
|
|
5
|
-
* @enhanceable
|
|
6
|
-
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
7
|
-
* field starts with 'MSG_' and isn't a translatable message.
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
// GENERATED CODE -- DO NOT EDIT!
|
|
11
|
-
var jspb = require('google-protobuf');
|
|
12
|
-
var goog = jspb;
|
|
13
|
-
var global = Function('return this')();
|
|
14
|
-
var proto_clarifai_api_utils_extensions_pb = require('../../../../proto/clarifai/api/utils/extensions_pb.js');
|
|
15
|
-
goog.object.extend(proto, proto_clarifai_api_utils_extensions_pb);
|
|
16
|
-
goog.exportSymbol('proto.clarifai.api.utils.TestProto', null, global);
|
|
17
|
-
goog.exportSymbol('proto.clarifai.api.utils.TestProto.OneOfFieldCase', null, global);
|
|
18
|
-
goog.exportSymbol('proto.clarifai.api.utils.TestProto2', null, global);
|
|
19
|
-
/**
|
|
20
|
-
* Generated by JsPbCodeGenerator.
|
|
21
|
-
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
22
|
-
* server response, or constructed directly in Javascript. The array is used
|
|
23
|
-
* in place and becomes part of the constructed object. It is not cloned.
|
|
24
|
-
* If no data is provided, the constructed object will be empty, but still
|
|
25
|
-
* valid.
|
|
26
|
-
* @extends {jspb.Message}
|
|
27
|
-
* @constructor
|
|
28
|
-
*/
|
|
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_);
|
|
31
|
-
};
|
|
32
|
-
goog.inherits(proto.clarifai.api.utils.TestProto, jspb.Message);
|
|
33
|
-
if (goog.DEBUG && !COMPILED) {
|
|
34
|
-
/**
|
|
35
|
-
* @public
|
|
36
|
-
* @override
|
|
37
|
-
*/
|
|
38
|
-
proto.clarifai.api.utils.TestProto.displayName = 'proto.clarifai.api.utils.TestProto';
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Generated by JsPbCodeGenerator.
|
|
42
|
-
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
43
|
-
* server response, or constructed directly in Javascript. The array is used
|
|
44
|
-
* in place and becomes part of the constructed object. It is not cloned.
|
|
45
|
-
* If no data is provided, the constructed object will be empty, but still
|
|
46
|
-
* valid.
|
|
47
|
-
* @extends {jspb.Message}
|
|
48
|
-
* @constructor
|
|
49
|
-
*/
|
|
50
|
-
proto.clarifai.api.utils.TestProto2 = function (opt_data) {
|
|
51
|
-
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
52
|
-
};
|
|
53
|
-
goog.inherits(proto.clarifai.api.utils.TestProto2, jspb.Message);
|
|
54
|
-
if (goog.DEBUG && !COMPILED) {
|
|
55
|
-
/**
|
|
56
|
-
* @public
|
|
57
|
-
* @override
|
|
58
|
-
*/
|
|
59
|
-
proto.clarifai.api.utils.TestProto2.displayName = 'proto.clarifai.api.utils.TestProto2';
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Oneof group definitions for this message. Each group defines the field
|
|
63
|
-
* numbers belonging to that group. When of these fields' value is set, all
|
|
64
|
-
* other fields in the group are cleared. During deserialization, if multiple
|
|
65
|
-
* fields are encountered for a group, only the last value seen will be kept.
|
|
66
|
-
* @private {!Array<!Array<number>>}
|
|
67
|
-
* @const
|
|
68
|
-
*/
|
|
69
|
-
proto.clarifai.api.utils.TestProto.oneofGroups_ = [[5, 6, 7]];
|
|
70
|
-
/**
|
|
71
|
-
* @enum {number}
|
|
72
|
-
*/
|
|
73
|
-
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
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* @return {proto.clarifai.api.utils.TestProto.OneOfFieldCase}
|
|
81
|
-
*/
|
|
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]));
|
|
84
|
-
};
|
|
85
|
-
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
|
-
};
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Deserializes binary data (in protobuf wire format).
|
|
128
|
-
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
129
|
-
* @return {!proto.clarifai.api.utils.TestProto}
|
|
130
|
-
*/
|
|
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);
|
|
135
|
-
};
|
|
136
|
-
/**
|
|
137
|
-
* Deserializes binary data (in protobuf wire format) from the
|
|
138
|
-
* given reader into the given message object.
|
|
139
|
-
* @param {!proto.clarifai.api.utils.TestProto} msg The message object to deserialize into.
|
|
140
|
-
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
141
|
-
* @return {!proto.clarifai.api.utils.TestProto}
|
|
142
|
-
*/
|
|
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
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return msg;
|
|
185
|
-
};
|
|
186
|
-
/**
|
|
187
|
-
* Serializes the message to binary data (in protobuf wire format).
|
|
188
|
-
* @return {!Uint8Array}
|
|
189
|
-
*/
|
|
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();
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* Serializes the given message to binary data (in protobuf wire
|
|
197
|
-
* format), writing to the given BinaryWriter.
|
|
198
|
-
* @param {!proto.clarifai.api.utils.TestProto} message
|
|
199
|
-
* @param {!jspb.BinaryWriter} writer
|
|
200
|
-
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
201
|
-
*/
|
|
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
|
-
};
|
|
233
|
-
/**
|
|
234
|
-
* optional string id = 1;
|
|
235
|
-
* @return {string}
|
|
236
|
-
*/
|
|
237
|
-
proto.clarifai.api.utils.TestProto.prototype.getId = function () {
|
|
238
|
-
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
239
|
-
};
|
|
240
|
-
/**
|
|
241
|
-
* @param {string} value
|
|
242
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
243
|
-
*/
|
|
244
|
-
proto.clarifai.api.utils.TestProto.prototype.setId = function (value) {
|
|
245
|
-
return jspb.Message.setProto3StringField(this, 1, value);
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* optional string message = 2;
|
|
249
|
-
* @return {string}
|
|
250
|
-
*/
|
|
251
|
-
proto.clarifai.api.utils.TestProto.prototype.getMessage = function () {
|
|
252
|
-
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
253
|
-
};
|
|
254
|
-
/**
|
|
255
|
-
* @param {string} value
|
|
256
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
257
|
-
*/
|
|
258
|
-
proto.clarifai.api.utils.TestProto.prototype.setMessage = function (value) {
|
|
259
|
-
return jspb.Message.setProto3StringField(this, 2, value);
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* optional double value = 3;
|
|
263
|
-
* @return {number}
|
|
264
|
-
*/
|
|
265
|
-
proto.clarifai.api.utils.TestProto.prototype.getValue = function () {
|
|
266
|
-
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
|
|
267
|
-
};
|
|
268
|
-
/**
|
|
269
|
-
* @param {number} value
|
|
270
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
271
|
-
*/
|
|
272
|
-
proto.clarifai.api.utils.TestProto.prototype.setValue = function (value) {
|
|
273
|
-
return jspb.Message.setProto3FloatField(this, 3, value);
|
|
274
|
-
};
|
|
275
|
-
/**
|
|
276
|
-
* optional bytes image_bytes = 4;
|
|
277
|
-
* @return {string}
|
|
278
|
-
*/
|
|
279
|
-
proto.clarifai.api.utils.TestProto.prototype.getImageBytes = function () {
|
|
280
|
-
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
281
|
-
};
|
|
282
|
-
/**
|
|
283
|
-
* optional bytes image_bytes = 4;
|
|
284
|
-
* This is a type-conversion wrapper around `getImageBytes()`
|
|
285
|
-
* @return {string}
|
|
286
|
-
*/
|
|
287
|
-
proto.clarifai.api.utils.TestProto.prototype.getImageBytes_asB64 = function () {
|
|
288
|
-
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getImageBytes()));
|
|
289
|
-
};
|
|
290
|
-
/**
|
|
291
|
-
* optional bytes image_bytes = 4;
|
|
292
|
-
* Note that Uint8Array is not supported on all browsers.
|
|
293
|
-
* @see http://caniuse.com/Uint8Array
|
|
294
|
-
* This is a type-conversion wrapper around `getImageBytes()`
|
|
295
|
-
* @return {!Uint8Array}
|
|
296
|
-
*/
|
|
297
|
-
proto.clarifai.api.utils.TestProto.prototype.getImageBytes_asU8 = function () {
|
|
298
|
-
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getImageBytes()));
|
|
299
|
-
};
|
|
300
|
-
/**
|
|
301
|
-
* @param {!(string|Uint8Array)} value
|
|
302
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
303
|
-
*/
|
|
304
|
-
proto.clarifai.api.utils.TestProto.prototype.setImageBytes = function (value) {
|
|
305
|
-
return jspb.Message.setProto3BytesField(this, 4, value);
|
|
306
|
-
};
|
|
307
|
-
/**
|
|
308
|
-
* optional string string_oneof = 5;
|
|
309
|
-
* @return {string}
|
|
310
|
-
*/
|
|
311
|
-
proto.clarifai.api.utils.TestProto.prototype.getStringOneof = function () {
|
|
312
|
-
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
|
313
|
-
};
|
|
314
|
-
/**
|
|
315
|
-
* @param {string} value
|
|
316
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
317
|
-
*/
|
|
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);
|
|
320
|
-
};
|
|
321
|
-
/**
|
|
322
|
-
* Clears the field making it undefined.
|
|
323
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
324
|
-
*/
|
|
325
|
-
proto.clarifai.api.utils.TestProto.prototype.clearStringOneof = function () {
|
|
326
|
-
return jspb.Message.setOneofField(this, 5, proto.clarifai.api.utils.TestProto.oneofGroups_[0], undefined);
|
|
327
|
-
};
|
|
328
|
-
/**
|
|
329
|
-
* Returns whether this field is set.
|
|
330
|
-
* @return {boolean}
|
|
331
|
-
*/
|
|
332
|
-
proto.clarifai.api.utils.TestProto.prototype.hasStringOneof = function () {
|
|
333
|
-
return jspb.Message.getField(this, 5) != null;
|
|
334
|
-
};
|
|
335
|
-
/**
|
|
336
|
-
* optional bool bool_oneof = 6;
|
|
337
|
-
* @return {boolean}
|
|
338
|
-
*/
|
|
339
|
-
proto.clarifai.api.utils.TestProto.prototype.getBoolOneof = function () {
|
|
340
|
-
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
|
|
341
|
-
};
|
|
342
|
-
/**
|
|
343
|
-
* @param {boolean} value
|
|
344
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
345
|
-
*/
|
|
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);
|
|
348
|
-
};
|
|
349
|
-
/**
|
|
350
|
-
* Clears the field making it undefined.
|
|
351
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
352
|
-
*/
|
|
353
|
-
proto.clarifai.api.utils.TestProto.prototype.clearBoolOneof = function () {
|
|
354
|
-
return jspb.Message.setOneofField(this, 6, proto.clarifai.api.utils.TestProto.oneofGroups_[0], undefined);
|
|
355
|
-
};
|
|
356
|
-
/**
|
|
357
|
-
* Returns whether this field is set.
|
|
358
|
-
* @return {boolean}
|
|
359
|
-
*/
|
|
360
|
-
proto.clarifai.api.utils.TestProto.prototype.hasBoolOneof = function () {
|
|
361
|
-
return jspb.Message.getField(this, 6) != null;
|
|
362
|
-
};
|
|
363
|
-
/**
|
|
364
|
-
* optional TestProto2 message_oneof = 7;
|
|
365
|
-
* @return {?proto.clarifai.api.utils.TestProto2}
|
|
366
|
-
*/
|
|
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));
|
|
369
|
-
};
|
|
370
|
-
/**
|
|
371
|
-
* @param {?proto.clarifai.api.utils.TestProto2|undefined} value
|
|
372
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
373
|
-
*/
|
|
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);
|
|
376
|
-
};
|
|
377
|
-
/**
|
|
378
|
-
* Clears the message field making it undefined.
|
|
379
|
-
* @return {!proto.clarifai.api.utils.TestProto} returns this
|
|
380
|
-
*/
|
|
381
|
-
proto.clarifai.api.utils.TestProto.prototype.clearMessageOneof = function () {
|
|
382
|
-
return this.setMessageOneof(undefined);
|
|
383
|
-
};
|
|
384
|
-
/**
|
|
385
|
-
* Returns whether this field is set.
|
|
386
|
-
* @return {boolean}
|
|
387
|
-
*/
|
|
388
|
-
proto.clarifai.api.utils.TestProto.prototype.hasMessageOneof = function () {
|
|
389
|
-
return jspb.Message.getField(this, 7) != null;
|
|
390
|
-
};
|
|
391
|
-
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
|
-
};
|
|
426
|
-
}
|
|
427
|
-
/**
|
|
428
|
-
* Deserializes binary data (in protobuf wire format).
|
|
429
|
-
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
430
|
-
* @return {!proto.clarifai.api.utils.TestProto2}
|
|
431
|
-
*/
|
|
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);
|
|
436
|
-
};
|
|
437
|
-
/**
|
|
438
|
-
* Deserializes binary data (in protobuf wire format) from the
|
|
439
|
-
* given reader into the given message object.
|
|
440
|
-
* @param {!proto.clarifai.api.utils.TestProto2} msg The message object to deserialize into.
|
|
441
|
-
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
442
|
-
* @return {!proto.clarifai.api.utils.TestProto2}
|
|
443
|
-
*/
|
|
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
|
-
}
|
|
463
|
-
}
|
|
464
|
-
return msg;
|
|
465
|
-
};
|
|
466
|
-
/**
|
|
467
|
-
* Serializes the message to binary data (in protobuf wire format).
|
|
468
|
-
* @return {!Uint8Array}
|
|
469
|
-
*/
|
|
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();
|
|
474
|
-
};
|
|
475
|
-
/**
|
|
476
|
-
* Serializes the given message to binary data (in protobuf wire
|
|
477
|
-
* format), writing to the given BinaryWriter.
|
|
478
|
-
* @param {!proto.clarifai.api.utils.TestProto2} message
|
|
479
|
-
* @param {!jspb.BinaryWriter} writer
|
|
480
|
-
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
481
|
-
*/
|
|
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
|
-
};
|
|
493
|
-
/**
|
|
494
|
-
* optional string id = 1;
|
|
495
|
-
* @return {string}
|
|
496
|
-
*/
|
|
497
|
-
proto.clarifai.api.utils.TestProto2.prototype.getId = function () {
|
|
498
|
-
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
499
|
-
};
|
|
500
|
-
/**
|
|
501
|
-
* @param {string} value
|
|
502
|
-
* @return {!proto.clarifai.api.utils.TestProto2} returns this
|
|
503
|
-
*/
|
|
504
|
-
proto.clarifai.api.utils.TestProto2.prototype.setId = function (value) {
|
|
505
|
-
return jspb.Message.setProto3StringField(this, 1, value);
|
|
506
|
-
};
|
|
507
|
-
/**
|
|
508
|
-
* optional bool flip = 2;
|
|
509
|
-
* @return {boolean}
|
|
510
|
-
*/
|
|
511
|
-
proto.clarifai.api.utils.TestProto2.prototype.getFlip = function () {
|
|
512
|
-
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
|
|
513
|
-
};
|
|
514
|
-
/**
|
|
515
|
-
* @param {boolean} value
|
|
516
|
-
* @return {!proto.clarifai.api.utils.TestProto2} returns this
|
|
517
|
-
*/
|
|
518
|
-
proto.clarifai.api.utils.TestProto2.prototype.setFlip = function (value) {
|
|
519
|
-
return jspb.Message.setProto3BooleanField(this, 2, value);
|
|
520
|
-
};
|
|
521
|
-
goog.object.extend(exports, proto.clarifai.api.utils);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|