clarifai-web-grpc 11.1.0 → 11.1.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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 11.1.0
1
+ 11.1.1
@@ -83,6 +83,7 @@ goog.exportSymbol('proto.clarifai.api.CommitmentValue', null, global);
83
83
  goog.exportSymbol('proto.clarifai.api.CommitmentValue.CommitmentType', null, global);
84
84
  goog.exportSymbol('proto.clarifai.api.ComputeCluster', null, global);
85
85
  goog.exportSymbol('proto.clarifai.api.ComputeInfo', null, global);
86
+ goog.exportSymbol('proto.clarifai.api.ComputePlaneMetrics', null, global);
86
87
  goog.exportSymbol('proto.clarifai.api.ComputeSourceMetadata', null, global);
87
88
  goog.exportSymbol('proto.clarifai.api.Concept', null, global);
88
89
  goog.exportSymbol('proto.clarifai.api.ConceptCount', null, global);
@@ -145,6 +146,7 @@ goog.exportSymbol('proto.clarifai.api.Geo', null, global);
145
146
  goog.exportSymbol('proto.clarifai.api.GeoBoxedPoint', null, global);
146
147
  goog.exportSymbol('proto.clarifai.api.GeoLimit', null, global);
147
148
  goog.exportSymbol('proto.clarifai.api.GeoPoint', null, global);
149
+ goog.exportSymbol('proto.clarifai.api.GpuMetrics', null, global);
148
150
  goog.exportSymbol('proto.clarifai.api.Hit', null, global);
149
151
  goog.exportSymbol('proto.clarifai.api.HitCount', null, global);
150
152
  goog.exportSymbol('proto.clarifai.api.HostedURL', null, global);
@@ -4930,6 +4932,48 @@ if (goog.DEBUG && !COMPILED) {
4930
4932
  */
4931
4933
  proto.clarifai.api.WorkflowVersionEvaluationTemplate.displayName = 'proto.clarifai.api.WorkflowVersionEvaluationTemplate';
4932
4934
  }
4935
+ /**
4936
+ * Generated by JsPbCodeGenerator.
4937
+ * @param {Array=} opt_data Optional initial data array, typically from a
4938
+ * server response, or constructed directly in Javascript. The array is used
4939
+ * in place and becomes part of the constructed object. It is not cloned.
4940
+ * If no data is provided, the constructed object will be empty, but still
4941
+ * valid.
4942
+ * @extends {jspb.Message}
4943
+ * @constructor
4944
+ */
4945
+ proto.clarifai.api.ComputePlaneMetrics = function (opt_data) {
4946
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.ComputePlaneMetrics.repeatedFields_, null);
4947
+ };
4948
+ goog.inherits(proto.clarifai.api.ComputePlaneMetrics, jspb.Message);
4949
+ if (goog.DEBUG && !COMPILED) {
4950
+ /**
4951
+ * @public
4952
+ * @override
4953
+ */
4954
+ proto.clarifai.api.ComputePlaneMetrics.displayName = 'proto.clarifai.api.ComputePlaneMetrics';
4955
+ }
4956
+ /**
4957
+ * Generated by JsPbCodeGenerator.
4958
+ * @param {Array=} opt_data Optional initial data array, typically from a
4959
+ * server response, or constructed directly in Javascript. The array is used
4960
+ * in place and becomes part of the constructed object. It is not cloned.
4961
+ * If no data is provided, the constructed object will be empty, but still
4962
+ * valid.
4963
+ * @extends {jspb.Message}
4964
+ * @constructor
4965
+ */
4966
+ proto.clarifai.api.GpuMetrics = function (opt_data) {
4967
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
4968
+ };
4969
+ goog.inherits(proto.clarifai.api.GpuMetrics, jspb.Message);
4970
+ if (goog.DEBUG && !COMPILED) {
4971
+ /**
4972
+ * @public
4973
+ * @override
4974
+ */
4975
+ proto.clarifai.api.GpuMetrics.displayName = 'proto.clarifai.api.GpuMetrics';
4976
+ }
4933
4977
  /**
4934
4978
  * Generated by JsPbCodeGenerator.
4935
4979
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -58932,6 +58976,594 @@ proto.clarifai.api.WorkflowVersionEvaluationTemplate.prototype.addWorkflowVersio
58932
58976
  proto.clarifai.api.WorkflowVersionEvaluationTemplate.prototype.clearWorkflowVersionEvaluationMetricsList = function () {
58933
58977
  return this.setWorkflowVersionEvaluationMetricsList([]);
58934
58978
  };
58979
+ /**
58980
+ * List of repeated fields within this message type.
58981
+ * @private {!Array<number>}
58982
+ * @const
58983
+ */
58984
+ proto.clarifai.api.ComputePlaneMetrics.repeatedFields_ = [10];
58985
+ if (jspb.Message.GENERATE_TO_OBJECT) {
58986
+ /**
58987
+ * Creates an object representation of this proto.
58988
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
58989
+ * Optional fields that are not set will be set to undefined.
58990
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
58991
+ * For the list of reserved names please see:
58992
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
58993
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
58994
+ * JSPB instance for transitional soy proto support:
58995
+ * http://goto/soy-param-migration
58996
+ * @return {!Object}
58997
+ */
58998
+ proto.clarifai.api.ComputePlaneMetrics.prototype.toObject = function (opt_includeInstance) {
58999
+ return proto.clarifai.api.ComputePlaneMetrics.toObject(opt_includeInstance, this);
59000
+ };
59001
+ /**
59002
+ * Static version of the {@see toObject} method.
59003
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
59004
+ * the JSPB instance for transitional soy proto support:
59005
+ * http://goto/soy-param-migration
59006
+ * @param {!proto.clarifai.api.ComputePlaneMetrics} msg The msg instance to transform.
59007
+ * @return {!Object}
59008
+ * @suppress {unusedLocalVariables} f is only used for nested messages
59009
+ */
59010
+ proto.clarifai.api.ComputePlaneMetrics.toObject = function (includeInstance, msg) {
59011
+ var f, obj = {
59012
+ meta: (f = msg.getMeta()) && proto.clarifai.api.ComputeSourceMetadata.toObject(includeInstance, f),
59013
+ cloud: jspb.Message.getFieldWithDefault(msg, 2, ""),
59014
+ region: jspb.Message.getFieldWithDefault(msg, 3, ""),
59015
+ instanceType: jspb.Message.getFieldWithDefault(msg, 4, ""),
59016
+ reservationType: jspb.Message.getFieldWithDefault(msg, 5, ""),
59017
+ reservationPrice: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0),
59018
+ runtimeS: jspb.Message.getFieldWithDefault(msg, 7, 0),
59019
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
59020
+ eventType: jspb.Message.getFieldWithDefault(msg, 9, ""),
59021
+ gpuMetricsList: jspb.Message.toObjectList(msg.getGpuMetricsList(), proto.clarifai.api.GpuMetrics.toObject, includeInstance),
59022
+ hostname: jspb.Message.getFieldWithDefault(msg, 11, "")
59023
+ };
59024
+ if (includeInstance) {
59025
+ obj.$jspbMessageInstance = msg;
59026
+ }
59027
+ return obj;
59028
+ };
59029
+ }
59030
+ /**
59031
+ * Deserializes binary data (in protobuf wire format).
59032
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
59033
+ * @return {!proto.clarifai.api.ComputePlaneMetrics}
59034
+ */
59035
+ proto.clarifai.api.ComputePlaneMetrics.deserializeBinary = function (bytes) {
59036
+ var reader = new jspb.BinaryReader(bytes);
59037
+ var msg = new proto.clarifai.api.ComputePlaneMetrics;
59038
+ return proto.clarifai.api.ComputePlaneMetrics.deserializeBinaryFromReader(msg, reader);
59039
+ };
59040
+ /**
59041
+ * Deserializes binary data (in protobuf wire format) from the
59042
+ * given reader into the given message object.
59043
+ * @param {!proto.clarifai.api.ComputePlaneMetrics} msg The message object to deserialize into.
59044
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
59045
+ * @return {!proto.clarifai.api.ComputePlaneMetrics}
59046
+ */
59047
+ proto.clarifai.api.ComputePlaneMetrics.deserializeBinaryFromReader = function (msg, reader) {
59048
+ while (reader.nextField()) {
59049
+ if (reader.isEndGroup()) {
59050
+ break;
59051
+ }
59052
+ var field = reader.getFieldNumber();
59053
+ switch (field) {
59054
+ case 1:
59055
+ var value = new proto.clarifai.api.ComputeSourceMetadata;
59056
+ reader.readMessage(value, proto.clarifai.api.ComputeSourceMetadata.deserializeBinaryFromReader);
59057
+ msg.setMeta(value);
59058
+ break;
59059
+ case 2:
59060
+ var value = /** @type {string} */ (reader.readString());
59061
+ msg.setCloud(value);
59062
+ break;
59063
+ case 3:
59064
+ var value = /** @type {string} */ (reader.readString());
59065
+ msg.setRegion(value);
59066
+ break;
59067
+ case 4:
59068
+ var value = /** @type {string} */ (reader.readString());
59069
+ msg.setInstanceType(value);
59070
+ break;
59071
+ case 5:
59072
+ var value = /** @type {string} */ (reader.readString());
59073
+ msg.setReservationType(value);
59074
+ break;
59075
+ case 6:
59076
+ var value = /** @type {number} */ (reader.readFloat());
59077
+ msg.setReservationPrice(value);
59078
+ break;
59079
+ case 7:
59080
+ var value = /** @type {number} */ (reader.readInt32());
59081
+ msg.setRuntimeS(value);
59082
+ break;
59083
+ case 8:
59084
+ var value = new google_protobuf_timestamp_pb.Timestamp;
59085
+ reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
59086
+ msg.setTimestamp(value);
59087
+ break;
59088
+ case 9:
59089
+ var value = /** @type {string} */ (reader.readString());
59090
+ msg.setEventType(value);
59091
+ break;
59092
+ case 10:
59093
+ var value = new proto.clarifai.api.GpuMetrics;
59094
+ reader.readMessage(value, proto.clarifai.api.GpuMetrics.deserializeBinaryFromReader);
59095
+ msg.addGpuMetrics(value);
59096
+ break;
59097
+ case 11:
59098
+ var value = /** @type {string} */ (reader.readString());
59099
+ msg.setHostname(value);
59100
+ break;
59101
+ default:
59102
+ reader.skipField();
59103
+ break;
59104
+ }
59105
+ }
59106
+ return msg;
59107
+ };
59108
+ /**
59109
+ * Serializes the message to binary data (in protobuf wire format).
59110
+ * @return {!Uint8Array}
59111
+ */
59112
+ proto.clarifai.api.ComputePlaneMetrics.prototype.serializeBinary = function () {
59113
+ var writer = new jspb.BinaryWriter();
59114
+ proto.clarifai.api.ComputePlaneMetrics.serializeBinaryToWriter(this, writer);
59115
+ return writer.getResultBuffer();
59116
+ };
59117
+ /**
59118
+ * Serializes the given message to binary data (in protobuf wire
59119
+ * format), writing to the given BinaryWriter.
59120
+ * @param {!proto.clarifai.api.ComputePlaneMetrics} message
59121
+ * @param {!jspb.BinaryWriter} writer
59122
+ * @suppress {unusedLocalVariables} f is only used for nested messages
59123
+ */
59124
+ proto.clarifai.api.ComputePlaneMetrics.serializeBinaryToWriter = function (message, writer) {
59125
+ var f = undefined;
59126
+ f = message.getMeta();
59127
+ if (f != null) {
59128
+ writer.writeMessage(1, f, proto.clarifai.api.ComputeSourceMetadata.serializeBinaryToWriter);
59129
+ }
59130
+ f = message.getCloud();
59131
+ if (f.length > 0) {
59132
+ writer.writeString(2, f);
59133
+ }
59134
+ f = message.getRegion();
59135
+ if (f.length > 0) {
59136
+ writer.writeString(3, f);
59137
+ }
59138
+ f = message.getInstanceType();
59139
+ if (f.length > 0) {
59140
+ writer.writeString(4, f);
59141
+ }
59142
+ f = message.getReservationType();
59143
+ if (f.length > 0) {
59144
+ writer.writeString(5, f);
59145
+ }
59146
+ f = message.getReservationPrice();
59147
+ if (f !== 0.0) {
59148
+ writer.writeFloat(6, f);
59149
+ }
59150
+ f = message.getRuntimeS();
59151
+ if (f !== 0) {
59152
+ writer.writeInt32(7, f);
59153
+ }
59154
+ f = message.getTimestamp();
59155
+ if (f != null) {
59156
+ writer.writeMessage(8, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter);
59157
+ }
59158
+ f = message.getEventType();
59159
+ if (f.length > 0) {
59160
+ writer.writeString(9, f);
59161
+ }
59162
+ f = message.getGpuMetricsList();
59163
+ if (f.length > 0) {
59164
+ writer.writeRepeatedMessage(10, f, proto.clarifai.api.GpuMetrics.serializeBinaryToWriter);
59165
+ }
59166
+ f = message.getHostname();
59167
+ if (f.length > 0) {
59168
+ writer.writeString(11, f);
59169
+ }
59170
+ };
59171
+ /**
59172
+ * optional ComputeSourceMetadata meta = 1;
59173
+ * @return {?proto.clarifai.api.ComputeSourceMetadata}
59174
+ */
59175
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getMeta = function () {
59176
+ return /** @type{?proto.clarifai.api.ComputeSourceMetadata} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.ComputeSourceMetadata, 1));
59177
+ };
59178
+ /**
59179
+ * @param {?proto.clarifai.api.ComputeSourceMetadata|undefined} value
59180
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59181
+ */
59182
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setMeta = function (value) {
59183
+ return jspb.Message.setWrapperField(this, 1, value);
59184
+ };
59185
+ /**
59186
+ * Clears the message field making it undefined.
59187
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59188
+ */
59189
+ proto.clarifai.api.ComputePlaneMetrics.prototype.clearMeta = function () {
59190
+ return this.setMeta(undefined);
59191
+ };
59192
+ /**
59193
+ * Returns whether this field is set.
59194
+ * @return {boolean}
59195
+ */
59196
+ proto.clarifai.api.ComputePlaneMetrics.prototype.hasMeta = function () {
59197
+ return jspb.Message.getField(this, 1) != null;
59198
+ };
59199
+ /**
59200
+ * optional string cloud = 2;
59201
+ * @return {string}
59202
+ */
59203
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getCloud = function () {
59204
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
59205
+ };
59206
+ /**
59207
+ * @param {string} value
59208
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59209
+ */
59210
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setCloud = function (value) {
59211
+ return jspb.Message.setProto3StringField(this, 2, value);
59212
+ };
59213
+ /**
59214
+ * optional string region = 3;
59215
+ * @return {string}
59216
+ */
59217
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getRegion = function () {
59218
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
59219
+ };
59220
+ /**
59221
+ * @param {string} value
59222
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59223
+ */
59224
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setRegion = function (value) {
59225
+ return jspb.Message.setProto3StringField(this, 3, value);
59226
+ };
59227
+ /**
59228
+ * optional string instance_type = 4;
59229
+ * @return {string}
59230
+ */
59231
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getInstanceType = function () {
59232
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
59233
+ };
59234
+ /**
59235
+ * @param {string} value
59236
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59237
+ */
59238
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setInstanceType = function (value) {
59239
+ return jspb.Message.setProto3StringField(this, 4, value);
59240
+ };
59241
+ /**
59242
+ * optional string reservation_type = 5;
59243
+ * @return {string}
59244
+ */
59245
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getReservationType = function () {
59246
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
59247
+ };
59248
+ /**
59249
+ * @param {string} value
59250
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59251
+ */
59252
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setReservationType = function (value) {
59253
+ return jspb.Message.setProto3StringField(this, 5, value);
59254
+ };
59255
+ /**
59256
+ * optional float reservation_price = 6;
59257
+ * @return {number}
59258
+ */
59259
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getReservationPrice = function () {
59260
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0));
59261
+ };
59262
+ /**
59263
+ * @param {number} value
59264
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59265
+ */
59266
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setReservationPrice = function (value) {
59267
+ return jspb.Message.setProto3FloatField(this, 6, value);
59268
+ };
59269
+ /**
59270
+ * optional int32 runtime_s = 7;
59271
+ * @return {number}
59272
+ */
59273
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getRuntimeS = function () {
59274
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
59275
+ };
59276
+ /**
59277
+ * @param {number} value
59278
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59279
+ */
59280
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setRuntimeS = function (value) {
59281
+ return jspb.Message.setProto3IntField(this, 7, value);
59282
+ };
59283
+ /**
59284
+ * optional google.protobuf.Timestamp timestamp = 8;
59285
+ * @return {?proto.google.protobuf.Timestamp}
59286
+ */
59287
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getTimestamp = function () {
59288
+ return /** @type{?proto.google.protobuf.Timestamp} */ (jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8));
59289
+ };
59290
+ /**
59291
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
59292
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59293
+ */
59294
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setTimestamp = function (value) {
59295
+ return jspb.Message.setWrapperField(this, 8, value);
59296
+ };
59297
+ /**
59298
+ * Clears the message field making it undefined.
59299
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59300
+ */
59301
+ proto.clarifai.api.ComputePlaneMetrics.prototype.clearTimestamp = function () {
59302
+ return this.setTimestamp(undefined);
59303
+ };
59304
+ /**
59305
+ * Returns whether this field is set.
59306
+ * @return {boolean}
59307
+ */
59308
+ proto.clarifai.api.ComputePlaneMetrics.prototype.hasTimestamp = function () {
59309
+ return jspb.Message.getField(this, 8) != null;
59310
+ };
59311
+ /**
59312
+ * optional string event_type = 9;
59313
+ * @return {string}
59314
+ */
59315
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getEventType = function () {
59316
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
59317
+ };
59318
+ /**
59319
+ * @param {string} value
59320
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59321
+ */
59322
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setEventType = function (value) {
59323
+ return jspb.Message.setProto3StringField(this, 9, value);
59324
+ };
59325
+ /**
59326
+ * repeated GpuMetrics gpu_metrics = 10;
59327
+ * @return {!Array<!proto.clarifai.api.GpuMetrics>}
59328
+ */
59329
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getGpuMetricsList = function () {
59330
+ return /** @type{!Array<!proto.clarifai.api.GpuMetrics>} */ (jspb.Message.getRepeatedWrapperField(this, proto.clarifai.api.GpuMetrics, 10));
59331
+ };
59332
+ /**
59333
+ * @param {!Array<!proto.clarifai.api.GpuMetrics>} value
59334
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59335
+ */
59336
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setGpuMetricsList = function (value) {
59337
+ return jspb.Message.setRepeatedWrapperField(this, 10, value);
59338
+ };
59339
+ /**
59340
+ * @param {!proto.clarifai.api.GpuMetrics=} opt_value
59341
+ * @param {number=} opt_index
59342
+ * @return {!proto.clarifai.api.GpuMetrics}
59343
+ */
59344
+ proto.clarifai.api.ComputePlaneMetrics.prototype.addGpuMetrics = function (opt_value, opt_index) {
59345
+ return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.clarifai.api.GpuMetrics, opt_index);
59346
+ };
59347
+ /**
59348
+ * Clears the list making it empty but non-null.
59349
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59350
+ */
59351
+ proto.clarifai.api.ComputePlaneMetrics.prototype.clearGpuMetricsList = function () {
59352
+ return this.setGpuMetricsList([]);
59353
+ };
59354
+ /**
59355
+ * optional string hostname = 11;
59356
+ * @return {string}
59357
+ */
59358
+ proto.clarifai.api.ComputePlaneMetrics.prototype.getHostname = function () {
59359
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
59360
+ };
59361
+ /**
59362
+ * @param {string} value
59363
+ * @return {!proto.clarifai.api.ComputePlaneMetrics} returns this
59364
+ */
59365
+ proto.clarifai.api.ComputePlaneMetrics.prototype.setHostname = function (value) {
59366
+ return jspb.Message.setProto3StringField(this, 11, value);
59367
+ };
59368
+ if (jspb.Message.GENERATE_TO_OBJECT) {
59369
+ /**
59370
+ * Creates an object representation of this proto.
59371
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
59372
+ * Optional fields that are not set will be set to undefined.
59373
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
59374
+ * For the list of reserved names please see:
59375
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
59376
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
59377
+ * JSPB instance for transitional soy proto support:
59378
+ * http://goto/soy-param-migration
59379
+ * @return {!Object}
59380
+ */
59381
+ proto.clarifai.api.GpuMetrics.prototype.toObject = function (opt_includeInstance) {
59382
+ return proto.clarifai.api.GpuMetrics.toObject(opt_includeInstance, this);
59383
+ };
59384
+ /**
59385
+ * Static version of the {@see toObject} method.
59386
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
59387
+ * the JSPB instance for transitional soy proto support:
59388
+ * http://goto/soy-param-migration
59389
+ * @param {!proto.clarifai.api.GpuMetrics} msg The msg instance to transform.
59390
+ * @return {!Object}
59391
+ * @suppress {unusedLocalVariables} f is only used for nested messages
59392
+ */
59393
+ proto.clarifai.api.GpuMetrics.toObject = function (includeInstance, msg) {
59394
+ var f, obj = {
59395
+ uuid: jspb.Message.getFieldWithDefault(msg, 1, ""),
59396
+ modelName: jspb.Message.getFieldWithDefault(msg, 2, ""),
59397
+ utilizationPct: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
59398
+ tensorUtilizationPct: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
59399
+ memoryUtilizationPct: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0)
59400
+ };
59401
+ if (includeInstance) {
59402
+ obj.$jspbMessageInstance = msg;
59403
+ }
59404
+ return obj;
59405
+ };
59406
+ }
59407
+ /**
59408
+ * Deserializes binary data (in protobuf wire format).
59409
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
59410
+ * @return {!proto.clarifai.api.GpuMetrics}
59411
+ */
59412
+ proto.clarifai.api.GpuMetrics.deserializeBinary = function (bytes) {
59413
+ var reader = new jspb.BinaryReader(bytes);
59414
+ var msg = new proto.clarifai.api.GpuMetrics;
59415
+ return proto.clarifai.api.GpuMetrics.deserializeBinaryFromReader(msg, reader);
59416
+ };
59417
+ /**
59418
+ * Deserializes binary data (in protobuf wire format) from the
59419
+ * given reader into the given message object.
59420
+ * @param {!proto.clarifai.api.GpuMetrics} msg The message object to deserialize into.
59421
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
59422
+ * @return {!proto.clarifai.api.GpuMetrics}
59423
+ */
59424
+ proto.clarifai.api.GpuMetrics.deserializeBinaryFromReader = function (msg, reader) {
59425
+ while (reader.nextField()) {
59426
+ if (reader.isEndGroup()) {
59427
+ break;
59428
+ }
59429
+ var field = reader.getFieldNumber();
59430
+ switch (field) {
59431
+ case 1:
59432
+ var value = /** @type {string} */ (reader.readString());
59433
+ msg.setUuid(value);
59434
+ break;
59435
+ case 2:
59436
+ var value = /** @type {string} */ (reader.readString());
59437
+ msg.setModelName(value);
59438
+ break;
59439
+ case 3:
59440
+ var value = /** @type {number} */ (reader.readFloat());
59441
+ msg.setUtilizationPct(value);
59442
+ break;
59443
+ case 4:
59444
+ var value = /** @type {number} */ (reader.readFloat());
59445
+ msg.setTensorUtilizationPct(value);
59446
+ break;
59447
+ case 5:
59448
+ var value = /** @type {number} */ (reader.readFloat());
59449
+ msg.setMemoryUtilizationPct(value);
59450
+ break;
59451
+ default:
59452
+ reader.skipField();
59453
+ break;
59454
+ }
59455
+ }
59456
+ return msg;
59457
+ };
59458
+ /**
59459
+ * Serializes the message to binary data (in protobuf wire format).
59460
+ * @return {!Uint8Array}
59461
+ */
59462
+ proto.clarifai.api.GpuMetrics.prototype.serializeBinary = function () {
59463
+ var writer = new jspb.BinaryWriter();
59464
+ proto.clarifai.api.GpuMetrics.serializeBinaryToWriter(this, writer);
59465
+ return writer.getResultBuffer();
59466
+ };
59467
+ /**
59468
+ * Serializes the given message to binary data (in protobuf wire
59469
+ * format), writing to the given BinaryWriter.
59470
+ * @param {!proto.clarifai.api.GpuMetrics} message
59471
+ * @param {!jspb.BinaryWriter} writer
59472
+ * @suppress {unusedLocalVariables} f is only used for nested messages
59473
+ */
59474
+ proto.clarifai.api.GpuMetrics.serializeBinaryToWriter = function (message, writer) {
59475
+ var f = undefined;
59476
+ f = message.getUuid();
59477
+ if (f.length > 0) {
59478
+ writer.writeString(1, f);
59479
+ }
59480
+ f = message.getModelName();
59481
+ if (f.length > 0) {
59482
+ writer.writeString(2, f);
59483
+ }
59484
+ f = message.getUtilizationPct();
59485
+ if (f !== 0.0) {
59486
+ writer.writeFloat(3, f);
59487
+ }
59488
+ f = message.getTensorUtilizationPct();
59489
+ if (f !== 0.0) {
59490
+ writer.writeFloat(4, f);
59491
+ }
59492
+ f = message.getMemoryUtilizationPct();
59493
+ if (f !== 0.0) {
59494
+ writer.writeFloat(5, f);
59495
+ }
59496
+ };
59497
+ /**
59498
+ * optional string uuid = 1;
59499
+ * @return {string}
59500
+ */
59501
+ proto.clarifai.api.GpuMetrics.prototype.getUuid = function () {
59502
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
59503
+ };
59504
+ /**
59505
+ * @param {string} value
59506
+ * @return {!proto.clarifai.api.GpuMetrics} returns this
59507
+ */
59508
+ proto.clarifai.api.GpuMetrics.prototype.setUuid = function (value) {
59509
+ return jspb.Message.setProto3StringField(this, 1, value);
59510
+ };
59511
+ /**
59512
+ * optional string model_name = 2;
59513
+ * @return {string}
59514
+ */
59515
+ proto.clarifai.api.GpuMetrics.prototype.getModelName = function () {
59516
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
59517
+ };
59518
+ /**
59519
+ * @param {string} value
59520
+ * @return {!proto.clarifai.api.GpuMetrics} returns this
59521
+ */
59522
+ proto.clarifai.api.GpuMetrics.prototype.setModelName = function (value) {
59523
+ return jspb.Message.setProto3StringField(this, 2, value);
59524
+ };
59525
+ /**
59526
+ * optional float utilization_pct = 3;
59527
+ * @return {number}
59528
+ */
59529
+ proto.clarifai.api.GpuMetrics.prototype.getUtilizationPct = function () {
59530
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
59531
+ };
59532
+ /**
59533
+ * @param {number} value
59534
+ * @return {!proto.clarifai.api.GpuMetrics} returns this
59535
+ */
59536
+ proto.clarifai.api.GpuMetrics.prototype.setUtilizationPct = function (value) {
59537
+ return jspb.Message.setProto3FloatField(this, 3, value);
59538
+ };
59539
+ /**
59540
+ * optional float tensor_utilization_pct = 4;
59541
+ * @return {number}
59542
+ */
59543
+ proto.clarifai.api.GpuMetrics.prototype.getTensorUtilizationPct = function () {
59544
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
59545
+ };
59546
+ /**
59547
+ * @param {number} value
59548
+ * @return {!proto.clarifai.api.GpuMetrics} returns this
59549
+ */
59550
+ proto.clarifai.api.GpuMetrics.prototype.setTensorUtilizationPct = function (value) {
59551
+ return jspb.Message.setProto3FloatField(this, 4, value);
59552
+ };
59553
+ /**
59554
+ * optional float memory_utilization_pct = 5;
59555
+ * @return {number}
59556
+ */
59557
+ proto.clarifai.api.GpuMetrics.prototype.getMemoryUtilizationPct = function () {
59558
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
59559
+ };
59560
+ /**
59561
+ * @param {number} value
59562
+ * @return {!proto.clarifai.api.GpuMetrics} returns this
59563
+ */
59564
+ proto.clarifai.api.GpuMetrics.prototype.setMemoryUtilizationPct = function (value) {
59565
+ return jspb.Message.setProto3FloatField(this, 5, value);
59566
+ };
58935
59567
  if (jspb.Message.GENERATE_TO_OBJECT) {
58936
59568
  /**
58937
59569
  * Creates an object representation of this proto.