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