clarifai-web-grpc 10.2.1 → 10.3.0

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 (35) hide show
  1. package/README.md +13 -11
  2. package/VERSION +1 -1
  3. package/dist/cjs/index.d.ts +2 -1
  4. package/dist/cjs/index.js +8 -2
  5. package/dist/cjs/proto/clarifai/api/resources_pb.js +2102 -4
  6. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.js +0 -42
  7. package/dist/cjs/proto/clarifai/api/service_pb.js +731 -416
  8. package/dist/cjs/proto/clarifai/api/status/status_code_pb.js +2 -0
  9. package/dist/cjs/proto/clarifai/auth/scope/scope_pb.js +2 -0
  10. package/dist/cjs/resources.d.ts +1 -0
  11. package/dist/cjs/resources.js +3 -0
  12. package/dist/esm/index.d.ts +2 -1
  13. package/dist/esm/index.js +6 -2
  14. package/dist/esm/proto/clarifai/api/resources_pb.js +2102 -4
  15. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.js +0 -42
  16. package/dist/esm/proto/clarifai/api/service_pb.js +731 -416
  17. package/dist/esm/proto/clarifai/api/status/status_code_pb.js +2 -0
  18. package/dist/esm/proto/clarifai/auth/scope/scope_pb.js +2 -0
  19. package/dist/esm/resources.d.ts +1 -0
  20. package/dist/esm/resources.js +1 -0
  21. package/examples/post-app.ts +27 -0
  22. package/examples/post-input.ts +42 -0
  23. package/index.ts +7 -2
  24. package/package.json +1 -1
  25. package/proto/clarifai/api/resources_pb.d.ts +347 -0
  26. package/proto/clarifai/api/resources_pb.js +2629 -4
  27. package/proto/clarifai/api/service_grpc_web_pb.d.ts +0 -12
  28. package/proto/clarifai/api/service_grpc_web_pb.js +0 -61
  29. package/proto/clarifai/api/service_pb.d.ts +106 -64
  30. package/proto/clarifai/api/service_pb.js +918 -510
  31. package/proto/clarifai/api/status/status_code_pb.d.ts +2 -0
  32. package/proto/clarifai/api/status/status_code_pb.js +2 -0
  33. package/proto/clarifai/auth/scope/scope_pb.d.ts +2 -0
  34. package/proto/clarifai/auth/scope/scope_pb.js +2 -0
  35. package/resources.ts +1 -0
@@ -56,19 +56,24 @@ goog.exportSymbol('proto.clarifai.api.AppExtraInfo', null, global);
56
56
  goog.exportSymbol('proto.clarifai.api.AppQuery', null, global);
57
57
  goog.exportSymbol('proto.clarifai.api.Audio', null, global);
58
58
  goog.exportSymbol('proto.clarifai.api.AudioInfo', null, global);
59
+ goog.exportSymbol('proto.clarifai.api.AutoscaleConfig', null, global);
59
60
  goog.exportSymbol('proto.clarifai.api.AzureBlobCreds', null, global);
60
61
  goog.exportSymbol('proto.clarifai.api.BinaryMetrics', null, global);
61
62
  goog.exportSymbol('proto.clarifai.api.BookmarkOrigin', null, global);
62
63
  goog.exportSymbol('proto.clarifai.api.BookmarkOrigin.BookmarkType', null, global);
63
64
  goog.exportSymbol('proto.clarifai.api.BoundingBox', null, global);
65
+ goog.exportSymbol('proto.clarifai.api.BuildInfo', null, global);
64
66
  goog.exportSymbol('proto.clarifai.api.BulkOperation', null, global);
65
67
  goog.exportSymbol('proto.clarifai.api.BulkOperation.InputSourceCase', null, global);
68
+ goog.exportSymbol('proto.clarifai.api.CloudRegion', null, global);
69
+ goog.exportSymbol('proto.clarifai.api.CloudRegion.Cloud', null, global);
66
70
  goog.exportSymbol('proto.clarifai.api.Cluster', null, global);
67
71
  goog.exportSymbol('proto.clarifai.api.Collaboration', null, global);
68
72
  goog.exportSymbol('proto.clarifai.api.Collaborator', null, global);
69
73
  goog.exportSymbol('proto.clarifai.api.Collector', null, global);
70
74
  goog.exportSymbol('proto.clarifai.api.CollectorSource', null, global);
71
75
  goog.exportSymbol('proto.clarifai.api.Color', null, global);
76
+ goog.exportSymbol('proto.clarifai.api.ComputeInfo', null, global);
72
77
  goog.exportSymbol('proto.clarifai.api.Concept', null, global);
73
78
  goog.exportSymbol('proto.clarifai.api.ConceptCount', null, global);
74
79
  goog.exportSymbol('proto.clarifai.api.ConceptExtraInfo', null, global);
@@ -105,6 +110,9 @@ goog.exportSymbol('proto.clarifai.api.DeleteConcepts', null, global);
105
110
  goog.exportSymbol('proto.clarifai.api.DeleteFromDataset', null, global);
106
111
  goog.exportSymbol('proto.clarifai.api.DeleteGeo', null, global);
107
112
  goog.exportSymbol('proto.clarifai.api.DeleteMetadata', null, global);
113
+ goog.exportSymbol('proto.clarifai.api.Deployment', null, global);
114
+ goog.exportSymbol('proto.clarifai.api.Deployment.ObjectCase', null, global);
115
+ goog.exportSymbol('proto.clarifai.api.Deployment.SchedulingChoice', null, global);
108
116
  goog.exportSymbol('proto.clarifai.api.DetailConceptCount', null, global);
109
117
  goog.exportSymbol('proto.clarifai.api.DuplicateAnnotationsResults', null, global);
110
118
  goog.exportSymbol('proto.clarifai.api.EmailAddress', null, global);
@@ -178,6 +186,8 @@ goog.exportSymbol('proto.clarifai.api.ModuleVersion', null, global);
178
186
  goog.exportSymbol('proto.clarifai.api.ModuleVersion.ModuleNav', null, global);
179
187
  goog.exportSymbol('proto.clarifai.api.ModuleVersion.ModuleSubNav', null, global);
180
188
  goog.exportSymbol('proto.clarifai.api.NodeInput', null, global);
189
+ goog.exportSymbol('proto.clarifai.api.Nodepool', null, global);
190
+ goog.exportSymbol('proto.clarifai.api.Nodepool.CapacityType', null, global);
181
191
  goog.exportSymbol('proto.clarifai.api.Operation', null, global);
182
192
  goog.exportSymbol('proto.clarifai.api.Operation.OperationCase', null, global);
183
193
  goog.exportSymbol('proto.clarifai.api.Output', null, global);
@@ -201,6 +211,8 @@ goog.exportSymbol('proto.clarifai.api.Region', null, global);
201
211
  goog.exportSymbol('proto.clarifai.api.RegionInfo', null, global);
202
212
  goog.exportSymbol('proto.clarifai.api.RoleType', null, global);
203
213
  goog.exportSymbol('proto.clarifai.api.Runner', null, global);
214
+ goog.exportSymbol('proto.clarifai.api.Runner.ObjectCase', null, global);
215
+ goog.exportSymbol('proto.clarifai.api.RunnerSelector', null, global);
204
216
  goog.exportSymbol('proto.clarifai.api.ScopeDeps', null, global);
205
217
  goog.exportSymbol('proto.clarifai.api.Search', null, global);
206
218
  goog.exportSymbol('proto.clarifai.api.Search.Metric', null, global);
@@ -1991,6 +2003,27 @@ if (goog.DEBUG && !COMPILED) {
1991
2003
  */
1992
2004
  proto.clarifai.api.ModelVersion.displayName = 'proto.clarifai.api.ModelVersion';
1993
2005
  }
2006
+ /**
2007
+ * Generated by JsPbCodeGenerator.
2008
+ * @param {Array=} opt_data Optional initial data array, typically from a
2009
+ * server response, or constructed directly in Javascript. The array is used
2010
+ * in place and becomes part of the constructed object. It is not cloned.
2011
+ * If no data is provided, the constructed object will be empty, but still
2012
+ * valid.
2013
+ * @extends {jspb.Message}
2014
+ * @constructor
2015
+ */
2016
+ proto.clarifai.api.BuildInfo = function (opt_data) {
2017
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
2018
+ };
2019
+ goog.inherits(proto.clarifai.api.BuildInfo, jspb.Message);
2020
+ if (goog.DEBUG && !COMPILED) {
2021
+ /**
2022
+ * @public
2023
+ * @override
2024
+ */
2025
+ proto.clarifai.api.BuildInfo.displayName = 'proto.clarifai.api.BuildInfo';
2026
+ }
1994
2027
  /**
1995
2028
  * Generated by JsPbCodeGenerator.
1996
2029
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -4438,7 +4471,7 @@ if (goog.DEBUG && !COMPILED) {
4438
4471
  * @constructor
4439
4472
  */
4440
4473
  proto.clarifai.api.Runner = function (opt_data) {
4441
- jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.Runner.repeatedFields_, null);
4474
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.Runner.repeatedFields_, proto.clarifai.api.Runner.oneofGroups_);
4442
4475
  };
4443
4476
  goog.inherits(proto.clarifai.api.Runner, jspb.Message);
4444
4477
  if (goog.DEBUG && !COMPILED) {
@@ -4448,6 +4481,132 @@ if (goog.DEBUG && !COMPILED) {
4448
4481
  */
4449
4482
  proto.clarifai.api.Runner.displayName = 'proto.clarifai.api.Runner';
4450
4483
  }
4484
+ /**
4485
+ * Generated by JsPbCodeGenerator.
4486
+ * @param {Array=} opt_data Optional initial data array, typically from a
4487
+ * server response, or constructed directly in Javascript. The array is used
4488
+ * in place and becomes part of the constructed object. It is not cloned.
4489
+ * If no data is provided, the constructed object will be empty, but still
4490
+ * valid.
4491
+ * @extends {jspb.Message}
4492
+ * @constructor
4493
+ */
4494
+ proto.clarifai.api.Nodepool = function (opt_data) {
4495
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.Nodepool.repeatedFields_, null);
4496
+ };
4497
+ goog.inherits(proto.clarifai.api.Nodepool, jspb.Message);
4498
+ if (goog.DEBUG && !COMPILED) {
4499
+ /**
4500
+ * @public
4501
+ * @override
4502
+ */
4503
+ proto.clarifai.api.Nodepool.displayName = 'proto.clarifai.api.Nodepool';
4504
+ }
4505
+ /**
4506
+ * Generated by JsPbCodeGenerator.
4507
+ * @param {Array=} opt_data Optional initial data array, typically from a
4508
+ * server response, or constructed directly in Javascript. The array is used
4509
+ * in place and becomes part of the constructed object. It is not cloned.
4510
+ * If no data is provided, the constructed object will be empty, but still
4511
+ * valid.
4512
+ * @extends {jspb.Message}
4513
+ * @constructor
4514
+ */
4515
+ proto.clarifai.api.CloudRegion = function (opt_data) {
4516
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
4517
+ };
4518
+ goog.inherits(proto.clarifai.api.CloudRegion, jspb.Message);
4519
+ if (goog.DEBUG && !COMPILED) {
4520
+ /**
4521
+ * @public
4522
+ * @override
4523
+ */
4524
+ proto.clarifai.api.CloudRegion.displayName = 'proto.clarifai.api.CloudRegion';
4525
+ }
4526
+ /**
4527
+ * Generated by JsPbCodeGenerator.
4528
+ * @param {Array=} opt_data Optional initial data array, typically from a
4529
+ * server response, or constructed directly in Javascript. The array is used
4530
+ * in place and becomes part of the constructed object. It is not cloned.
4531
+ * If no data is provided, the constructed object will be empty, but still
4532
+ * valid.
4533
+ * @extends {jspb.Message}
4534
+ * @constructor
4535
+ */
4536
+ proto.clarifai.api.ComputeInfo = function (opt_data) {
4537
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.ComputeInfo.repeatedFields_, null);
4538
+ };
4539
+ goog.inherits(proto.clarifai.api.ComputeInfo, jspb.Message);
4540
+ if (goog.DEBUG && !COMPILED) {
4541
+ /**
4542
+ * @public
4543
+ * @override
4544
+ */
4545
+ proto.clarifai.api.ComputeInfo.displayName = 'proto.clarifai.api.ComputeInfo';
4546
+ }
4547
+ /**
4548
+ * Generated by JsPbCodeGenerator.
4549
+ * @param {Array=} opt_data Optional initial data array, typically from a
4550
+ * server response, or constructed directly in Javascript. The array is used
4551
+ * in place and becomes part of the constructed object. It is not cloned.
4552
+ * If no data is provided, the constructed object will be empty, but still
4553
+ * valid.
4554
+ * @extends {jspb.Message}
4555
+ * @constructor
4556
+ */
4557
+ proto.clarifai.api.AutoscaleConfig = function (opt_data) {
4558
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
4559
+ };
4560
+ goog.inherits(proto.clarifai.api.AutoscaleConfig, jspb.Message);
4561
+ if (goog.DEBUG && !COMPILED) {
4562
+ /**
4563
+ * @public
4564
+ * @override
4565
+ */
4566
+ proto.clarifai.api.AutoscaleConfig.displayName = 'proto.clarifai.api.AutoscaleConfig';
4567
+ }
4568
+ /**
4569
+ * Generated by JsPbCodeGenerator.
4570
+ * @param {Array=} opt_data Optional initial data array, typically from a
4571
+ * server response, or constructed directly in Javascript. The array is used
4572
+ * in place and becomes part of the constructed object. It is not cloned.
4573
+ * If no data is provided, the constructed object will be empty, but still
4574
+ * valid.
4575
+ * @extends {jspb.Message}
4576
+ * @constructor
4577
+ */
4578
+ proto.clarifai.api.Deployment = function (opt_data) {
4579
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.Deployment.repeatedFields_, proto.clarifai.api.Deployment.oneofGroups_);
4580
+ };
4581
+ goog.inherits(proto.clarifai.api.Deployment, jspb.Message);
4582
+ if (goog.DEBUG && !COMPILED) {
4583
+ /**
4584
+ * @public
4585
+ * @override
4586
+ */
4587
+ proto.clarifai.api.Deployment.displayName = 'proto.clarifai.api.Deployment';
4588
+ }
4589
+ /**
4590
+ * Generated by JsPbCodeGenerator.
4591
+ * @param {Array=} opt_data Optional initial data array, typically from a
4592
+ * server response, or constructed directly in Javascript. The array is used
4593
+ * in place and becomes part of the constructed object. It is not cloned.
4594
+ * If no data is provided, the constructed object will be empty, but still
4595
+ * valid.
4596
+ * @extends {jspb.Message}
4597
+ * @constructor
4598
+ */
4599
+ proto.clarifai.api.RunnerSelector = function (opt_data) {
4600
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
4601
+ };
4602
+ goog.inherits(proto.clarifai.api.RunnerSelector, jspb.Message);
4603
+ if (goog.DEBUG && !COMPILED) {
4604
+ /**
4605
+ * @public
4606
+ * @override
4607
+ */
4608
+ proto.clarifai.api.RunnerSelector.displayName = 'proto.clarifai.api.RunnerSelector';
4609
+ }
4451
4610
  if (jspb.Message.GENERATE_TO_OBJECT) {
4452
4611
  /**
4453
4612
  * Creates an object representation of this proto.
@@ -24093,7 +24252,9 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
24093
24252
  inputInfo: (f = msg.getInputInfo()) && proto.clarifai.api.InputInfo.toObject(includeInstance, f),
24094
24253
  trainInfo: (f = msg.getTrainInfo()) && proto.clarifai.api.TrainInfo.toObject(includeInstance, f),
24095
24254
  importInfo: (f = msg.getImportInfo()) && proto.clarifai.api.ImportInfo.toObject(includeInstance, f),
24096
- trainLog: jspb.Message.getFieldWithDefault(msg, 23, "")
24255
+ trainLog: jspb.Message.getFieldWithDefault(msg, 23, ""),
24256
+ inferenceComputeInfo: (f = msg.getInferenceComputeInfo()) && proto.clarifai.api.ComputeInfo.toObject(includeInstance, f),
24257
+ buildInfo: (f = msg.getBuildInfo()) && proto.clarifai.api.BuildInfo.toObject(includeInstance, f)
24097
24258
  };
24098
24259
  if (includeInstance) {
24099
24260
  obj.$jspbMessageInstance = msg;
@@ -24217,6 +24378,16 @@ proto.clarifai.api.ModelVersion.deserializeBinaryFromReader = function (msg, rea
24217
24378
  var value = /** @type {string} */ (reader.readString());
24218
24379
  msg.setTrainLog(value);
24219
24380
  break;
24381
+ case 24:
24382
+ var value = new proto.clarifai.api.ComputeInfo;
24383
+ reader.readMessage(value, proto.clarifai.api.ComputeInfo.deserializeBinaryFromReader);
24384
+ msg.setInferenceComputeInfo(value);
24385
+ break;
24386
+ case 25:
24387
+ var value = new proto.clarifai.api.BuildInfo;
24388
+ reader.readMessage(value, proto.clarifai.api.BuildInfo.deserializeBinaryFromReader);
24389
+ msg.setBuildInfo(value);
24390
+ break;
24220
24391
  default:
24221
24392
  reader.skipField();
24222
24393
  break;
@@ -24322,6 +24493,14 @@ proto.clarifai.api.ModelVersion.serializeBinaryToWriter = function (message, wri
24322
24493
  if (f.length > 0) {
24323
24494
  writer.writeString(23, f);
24324
24495
  }
24496
+ f = message.getInferenceComputeInfo();
24497
+ if (f != null) {
24498
+ writer.writeMessage(24, f, proto.clarifai.api.ComputeInfo.serializeBinaryToWriter);
24499
+ }
24500
+ f = message.getBuildInfo();
24501
+ if (f != null) {
24502
+ writer.writeMessage(25, f, proto.clarifai.api.BuildInfo.serializeBinaryToWriter);
24503
+ }
24325
24504
  };
24326
24505
  /**
24327
24506
  * optional string id = 1;
@@ -24771,6 +24950,215 @@ proto.clarifai.api.ModelVersion.prototype.getTrainLog = function () {
24771
24950
  proto.clarifai.api.ModelVersion.prototype.setTrainLog = function (value) {
24772
24951
  return jspb.Message.setProto3StringField(this, 23, value);
24773
24952
  };
24953
+ /**
24954
+ * optional ComputeInfo inference_compute_info = 24;
24955
+ * @return {?proto.clarifai.api.ComputeInfo}
24956
+ */
24957
+ proto.clarifai.api.ModelVersion.prototype.getInferenceComputeInfo = function () {
24958
+ return /** @type{?proto.clarifai.api.ComputeInfo} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.ComputeInfo, 24));
24959
+ };
24960
+ /**
24961
+ * @param {?proto.clarifai.api.ComputeInfo|undefined} value
24962
+ * @return {!proto.clarifai.api.ModelVersion} returns this
24963
+ */
24964
+ proto.clarifai.api.ModelVersion.prototype.setInferenceComputeInfo = function (value) {
24965
+ return jspb.Message.setWrapperField(this, 24, value);
24966
+ };
24967
+ /**
24968
+ * Clears the message field making it undefined.
24969
+ * @return {!proto.clarifai.api.ModelVersion} returns this
24970
+ */
24971
+ proto.clarifai.api.ModelVersion.prototype.clearInferenceComputeInfo = function () {
24972
+ return this.setInferenceComputeInfo(undefined);
24973
+ };
24974
+ /**
24975
+ * Returns whether this field is set.
24976
+ * @return {boolean}
24977
+ */
24978
+ proto.clarifai.api.ModelVersion.prototype.hasInferenceComputeInfo = function () {
24979
+ return jspb.Message.getField(this, 24) != null;
24980
+ };
24981
+ /**
24982
+ * optional BuildInfo build_info = 25;
24983
+ * @return {?proto.clarifai.api.BuildInfo}
24984
+ */
24985
+ proto.clarifai.api.ModelVersion.prototype.getBuildInfo = function () {
24986
+ return /** @type{?proto.clarifai.api.BuildInfo} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.BuildInfo, 25));
24987
+ };
24988
+ /**
24989
+ * @param {?proto.clarifai.api.BuildInfo|undefined} value
24990
+ * @return {!proto.clarifai.api.ModelVersion} returns this
24991
+ */
24992
+ proto.clarifai.api.ModelVersion.prototype.setBuildInfo = function (value) {
24993
+ return jspb.Message.setWrapperField(this, 25, value);
24994
+ };
24995
+ /**
24996
+ * Clears the message field making it undefined.
24997
+ * @return {!proto.clarifai.api.ModelVersion} returns this
24998
+ */
24999
+ proto.clarifai.api.ModelVersion.prototype.clearBuildInfo = function () {
25000
+ return this.setBuildInfo(undefined);
25001
+ };
25002
+ /**
25003
+ * Returns whether this field is set.
25004
+ * @return {boolean}
25005
+ */
25006
+ proto.clarifai.api.ModelVersion.prototype.hasBuildInfo = function () {
25007
+ return jspb.Message.getField(this, 25) != null;
25008
+ };
25009
+ if (jspb.Message.GENERATE_TO_OBJECT) {
25010
+ /**
25011
+ * Creates an object representation of this proto.
25012
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
25013
+ * Optional fields that are not set will be set to undefined.
25014
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
25015
+ * For the list of reserved names please see:
25016
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
25017
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
25018
+ * JSPB instance for transitional soy proto support:
25019
+ * http://goto/soy-param-migration
25020
+ * @return {!Object}
25021
+ */
25022
+ proto.clarifai.api.BuildInfo.prototype.toObject = function (opt_includeInstance) {
25023
+ return proto.clarifai.api.BuildInfo.toObject(opt_includeInstance, this);
25024
+ };
25025
+ /**
25026
+ * Static version of the {@see toObject} method.
25027
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
25028
+ * the JSPB instance for transitional soy proto support:
25029
+ * http://goto/soy-param-migration
25030
+ * @param {!proto.clarifai.api.BuildInfo} msg The msg instance to transform.
25031
+ * @return {!Object}
25032
+ * @suppress {unusedLocalVariables} f is only used for nested messages
25033
+ */
25034
+ proto.clarifai.api.BuildInfo.toObject = function (includeInstance, msg) {
25035
+ var f, obj = {
25036
+ dockerImageName: jspb.Message.getFieldWithDefault(msg, 1, ""),
25037
+ dockerImageTag: jspb.Message.getFieldWithDefault(msg, 2, ""),
25038
+ dockerImageDigest: jspb.Message.getFieldWithDefault(msg, 3, "")
25039
+ };
25040
+ if (includeInstance) {
25041
+ obj.$jspbMessageInstance = msg;
25042
+ }
25043
+ return obj;
25044
+ };
25045
+ }
25046
+ /**
25047
+ * Deserializes binary data (in protobuf wire format).
25048
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
25049
+ * @return {!proto.clarifai.api.BuildInfo}
25050
+ */
25051
+ proto.clarifai.api.BuildInfo.deserializeBinary = function (bytes) {
25052
+ var reader = new jspb.BinaryReader(bytes);
25053
+ var msg = new proto.clarifai.api.BuildInfo;
25054
+ return proto.clarifai.api.BuildInfo.deserializeBinaryFromReader(msg, reader);
25055
+ };
25056
+ /**
25057
+ * Deserializes binary data (in protobuf wire format) from the
25058
+ * given reader into the given message object.
25059
+ * @param {!proto.clarifai.api.BuildInfo} msg The message object to deserialize into.
25060
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
25061
+ * @return {!proto.clarifai.api.BuildInfo}
25062
+ */
25063
+ proto.clarifai.api.BuildInfo.deserializeBinaryFromReader = function (msg, reader) {
25064
+ while (reader.nextField()) {
25065
+ if (reader.isEndGroup()) {
25066
+ break;
25067
+ }
25068
+ var field = reader.getFieldNumber();
25069
+ switch (field) {
25070
+ case 1:
25071
+ var value = /** @type {string} */ (reader.readString());
25072
+ msg.setDockerImageName(value);
25073
+ break;
25074
+ case 2:
25075
+ var value = /** @type {string} */ (reader.readString());
25076
+ msg.setDockerImageTag(value);
25077
+ break;
25078
+ case 3:
25079
+ var value = /** @type {string} */ (reader.readString());
25080
+ msg.setDockerImageDigest(value);
25081
+ break;
25082
+ default:
25083
+ reader.skipField();
25084
+ break;
25085
+ }
25086
+ }
25087
+ return msg;
25088
+ };
25089
+ /**
25090
+ * Serializes the message to binary data (in protobuf wire format).
25091
+ * @return {!Uint8Array}
25092
+ */
25093
+ proto.clarifai.api.BuildInfo.prototype.serializeBinary = function () {
25094
+ var writer = new jspb.BinaryWriter();
25095
+ proto.clarifai.api.BuildInfo.serializeBinaryToWriter(this, writer);
25096
+ return writer.getResultBuffer();
25097
+ };
25098
+ /**
25099
+ * Serializes the given message to binary data (in protobuf wire
25100
+ * format), writing to the given BinaryWriter.
25101
+ * @param {!proto.clarifai.api.BuildInfo} message
25102
+ * @param {!jspb.BinaryWriter} writer
25103
+ * @suppress {unusedLocalVariables} f is only used for nested messages
25104
+ */
25105
+ proto.clarifai.api.BuildInfo.serializeBinaryToWriter = function (message, writer) {
25106
+ var f = undefined;
25107
+ f = message.getDockerImageName();
25108
+ if (f.length > 0) {
25109
+ writer.writeString(1, f);
25110
+ }
25111
+ f = message.getDockerImageTag();
25112
+ if (f.length > 0) {
25113
+ writer.writeString(2, f);
25114
+ }
25115
+ f = message.getDockerImageDigest();
25116
+ if (f.length > 0) {
25117
+ writer.writeString(3, f);
25118
+ }
25119
+ };
25120
+ /**
25121
+ * optional string docker_image_name = 1;
25122
+ * @return {string}
25123
+ */
25124
+ proto.clarifai.api.BuildInfo.prototype.getDockerImageName = function () {
25125
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
25126
+ };
25127
+ /**
25128
+ * @param {string} value
25129
+ * @return {!proto.clarifai.api.BuildInfo} returns this
25130
+ */
25131
+ proto.clarifai.api.BuildInfo.prototype.setDockerImageName = function (value) {
25132
+ return jspb.Message.setProto3StringField(this, 1, value);
25133
+ };
25134
+ /**
25135
+ * optional string docker_image_tag = 2;
25136
+ * @return {string}
25137
+ */
25138
+ proto.clarifai.api.BuildInfo.prototype.getDockerImageTag = function () {
25139
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
25140
+ };
25141
+ /**
25142
+ * @param {string} value
25143
+ * @return {!proto.clarifai.api.BuildInfo} returns this
25144
+ */
25145
+ proto.clarifai.api.BuildInfo.prototype.setDockerImageTag = function (value) {
25146
+ return jspb.Message.setProto3StringField(this, 2, value);
25147
+ };
25148
+ /**
25149
+ * optional string docker_image_digest = 3;
25150
+ * @return {string}
25151
+ */
25152
+ proto.clarifai.api.BuildInfo.prototype.getDockerImageDigest = function () {
25153
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
25154
+ };
25155
+ /**
25156
+ * @param {string} value
25157
+ * @return {!proto.clarifai.api.BuildInfo} returns this
25158
+ */
25159
+ proto.clarifai.api.BuildInfo.prototype.setDockerImageDigest = function (value) {
25160
+ return jspb.Message.setProto3StringField(this, 3, value);
25161
+ };
24774
25162
  if (jspb.Message.GENERATE_TO_OBJECT) {
24775
25163
  /**
24776
25164
  * Creates an object representation of this proto.
@@ -27603,7 +27991,9 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
27603
27991
  input: (f = msg.getInput()) && proto.clarifai.api.Input.toObject(includeInstance, f),
27604
27992
  predictedConceptsList: jspb.Message.toObjectList(msg.getPredictedConceptsList(), proto.clarifai.api.Concept.toObject, includeInstance),
27605
27993
  groundTruthConceptsList: jspb.Message.toObjectList(msg.getGroundTruthConceptsList(), proto.clarifai.api.Concept.toObject, includeInstance),
27606
- annotation: (f = msg.getAnnotation()) && proto.clarifai.api.Annotation.toObject(includeInstance, f)
27994
+ annotation: (f = msg.getAnnotation()) && proto.clarifai.api.Annotation.toObject(includeInstance, f),
27995
+ predictedAnnotation: (f = msg.getPredictedAnnotation()) && proto.clarifai.api.Annotation.toObject(includeInstance, f),
27996
+ groundTruthAnnotation: (f = msg.getGroundTruthAnnotation()) && proto.clarifai.api.Annotation.toObject(includeInstance, f)
27607
27997
  };
27608
27998
  if (includeInstance) {
27609
27999
  obj.$jspbMessageInstance = msg;
@@ -27655,6 +28045,16 @@ proto.clarifai.api.EvalTestSetEntry.deserializeBinaryFromReader = function (msg,
27655
28045
  reader.readMessage(value, proto.clarifai.api.Annotation.deserializeBinaryFromReader);
27656
28046
  msg.setAnnotation(value);
27657
28047
  break;
28048
+ case 7:
28049
+ var value = new proto.clarifai.api.Annotation;
28050
+ reader.readMessage(value, proto.clarifai.api.Annotation.deserializeBinaryFromReader);
28051
+ msg.setPredictedAnnotation(value);
28052
+ break;
28053
+ case 8:
28054
+ var value = new proto.clarifai.api.Annotation;
28055
+ reader.readMessage(value, proto.clarifai.api.Annotation.deserializeBinaryFromReader);
28056
+ msg.setGroundTruthAnnotation(value);
28057
+ break;
27658
28058
  default:
27659
28059
  reader.skipField();
27660
28060
  break;
@@ -27696,6 +28096,14 @@ proto.clarifai.api.EvalTestSetEntry.serializeBinaryToWriter = function (message,
27696
28096
  if (f != null) {
27697
28097
  writer.writeMessage(5, f, proto.clarifai.api.Annotation.serializeBinaryToWriter);
27698
28098
  }
28099
+ f = message.getPredictedAnnotation();
28100
+ if (f != null) {
28101
+ writer.writeMessage(7, f, proto.clarifai.api.Annotation.serializeBinaryToWriter);
28102
+ }
28103
+ f = message.getGroundTruthAnnotation();
28104
+ if (f != null) {
28105
+ writer.writeMessage(8, f, proto.clarifai.api.Annotation.serializeBinaryToWriter);
28106
+ }
27699
28107
  };
27700
28108
  /**
27701
28109
  * optional Input input = 6;
@@ -27811,6 +28219,62 @@ proto.clarifai.api.EvalTestSetEntry.prototype.clearAnnotation = function () {
27811
28219
  proto.clarifai.api.EvalTestSetEntry.prototype.hasAnnotation = function () {
27812
28220
  return jspb.Message.getField(this, 5) != null;
27813
28221
  };
28222
+ /**
28223
+ * optional Annotation predicted_annotation = 7;
28224
+ * @return {?proto.clarifai.api.Annotation}
28225
+ */
28226
+ proto.clarifai.api.EvalTestSetEntry.prototype.getPredictedAnnotation = function () {
28227
+ return /** @type{?proto.clarifai.api.Annotation} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Annotation, 7));
28228
+ };
28229
+ /**
28230
+ * @param {?proto.clarifai.api.Annotation|undefined} value
28231
+ * @return {!proto.clarifai.api.EvalTestSetEntry} returns this
28232
+ */
28233
+ proto.clarifai.api.EvalTestSetEntry.prototype.setPredictedAnnotation = function (value) {
28234
+ return jspb.Message.setWrapperField(this, 7, value);
28235
+ };
28236
+ /**
28237
+ * Clears the message field making it undefined.
28238
+ * @return {!proto.clarifai.api.EvalTestSetEntry} returns this
28239
+ */
28240
+ proto.clarifai.api.EvalTestSetEntry.prototype.clearPredictedAnnotation = function () {
28241
+ return this.setPredictedAnnotation(undefined);
28242
+ };
28243
+ /**
28244
+ * Returns whether this field is set.
28245
+ * @return {boolean}
28246
+ */
28247
+ proto.clarifai.api.EvalTestSetEntry.prototype.hasPredictedAnnotation = function () {
28248
+ return jspb.Message.getField(this, 7) != null;
28249
+ };
28250
+ /**
28251
+ * optional Annotation ground_truth_annotation = 8;
28252
+ * @return {?proto.clarifai.api.Annotation}
28253
+ */
28254
+ proto.clarifai.api.EvalTestSetEntry.prototype.getGroundTruthAnnotation = function () {
28255
+ return /** @type{?proto.clarifai.api.Annotation} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Annotation, 8));
28256
+ };
28257
+ /**
28258
+ * @param {?proto.clarifai.api.Annotation|undefined} value
28259
+ * @return {!proto.clarifai.api.EvalTestSetEntry} returns this
28260
+ */
28261
+ proto.clarifai.api.EvalTestSetEntry.prototype.setGroundTruthAnnotation = function (value) {
28262
+ return jspb.Message.setWrapperField(this, 8, value);
28263
+ };
28264
+ /**
28265
+ * Clears the message field making it undefined.
28266
+ * @return {!proto.clarifai.api.EvalTestSetEntry} returns this
28267
+ */
28268
+ proto.clarifai.api.EvalTestSetEntry.prototype.clearGroundTruthAnnotation = function () {
28269
+ return this.setGroundTruthAnnotation(undefined);
28270
+ };
28271
+ /**
28272
+ * Returns whether this field is set.
28273
+ * @return {boolean}
28274
+ */
28275
+ proto.clarifai.api.EvalTestSetEntry.prototype.hasGroundTruthAnnotation = function () {
28276
+ return jspb.Message.getField(this, 8) != null;
28277
+ };
27814
28278
  if (jspb.Message.GENERATE_TO_OBJECT) {
27815
28279
  /**
27816
28280
  * Creates an object representation of this proto.
@@ -51432,6 +51896,29 @@ proto.clarifai.api.BookmarkOrigin.prototype.setResourceType = function (value) {
51432
51896
  * @const
51433
51897
  */
51434
51898
  proto.clarifai.api.Runner.repeatedFields_ = [7];
51899
+ /**
51900
+ * Oneof group definitions for this message. Each group defines the field
51901
+ * numbers belonging to that group. When of these fields' value is set, all
51902
+ * other fields in the group are cleared. During deserialization, if multiple
51903
+ * fields are encountered for a group, only the last value seen will be kept.
51904
+ * @private {!Array<!Array<number>>}
51905
+ * @const
51906
+ */
51907
+ proto.clarifai.api.Runner.oneofGroups_ = [[9, 10]];
51908
+ /**
51909
+ * @enum {number}
51910
+ */
51911
+ proto.clarifai.api.Runner.ObjectCase = {
51912
+ OBJECT_NOT_SET: 0,
51913
+ MODEL: 9,
51914
+ WORKFLOW: 10
51915
+ };
51916
+ /**
51917
+ * @return {proto.clarifai.api.Runner.ObjectCase}
51918
+ */
51919
+ proto.clarifai.api.Runner.prototype.getObjectCase = function () {
51920
+ return /** @type {proto.clarifai.api.Runner.ObjectCase} */ (jspb.Message.computeOneofCase(this, proto.clarifai.api.Runner.oneofGroups_[0]));
51921
+ };
51435
51922
  if (jspb.Message.GENERATE_TO_OBJECT) {
51436
51923
  /**
51437
51924
  * Creates an object representation of this proto.
@@ -51465,7 +51952,11 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
51465
51952
  modifiedAt: (f = msg.getModifiedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
51466
51953
  metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
51467
51954
  userId: jspb.Message.getFieldWithDefault(msg, 6, ""),
51468
- labelsList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f
51955
+ labelsList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f,
51956
+ model: (f = msg.getModel()) && proto.clarifai.api.Model.toObject(includeInstance, f),
51957
+ workflow: (f = msg.getWorkflow()) && proto.clarifai.api.Workflow.toObject(includeInstance, f),
51958
+ nodepool: (f = msg.getNodepool()) && proto.clarifai.api.Nodepool.toObject(includeInstance, f),
51959
+ computeInfo: (f = msg.getComputeInfo()) && proto.clarifai.api.ComputeInfo.toObject(includeInstance, f)
51469
51960
  };
51470
51961
  if (includeInstance) {
51471
51962
  obj.$jspbMessageInstance = msg;
@@ -51528,6 +52019,26 @@ proto.clarifai.api.Runner.deserializeBinaryFromReader = function (msg, reader) {
51528
52019
  var value = /** @type {string} */ (reader.readString());
51529
52020
  msg.addLabels(value);
51530
52021
  break;
52022
+ case 9:
52023
+ var value = new proto.clarifai.api.Model;
52024
+ reader.readMessage(value, proto.clarifai.api.Model.deserializeBinaryFromReader);
52025
+ msg.setModel(value);
52026
+ break;
52027
+ case 10:
52028
+ var value = new proto.clarifai.api.Workflow;
52029
+ reader.readMessage(value, proto.clarifai.api.Workflow.deserializeBinaryFromReader);
52030
+ msg.setWorkflow(value);
52031
+ break;
52032
+ case 12:
52033
+ var value = new proto.clarifai.api.Nodepool;
52034
+ reader.readMessage(value, proto.clarifai.api.Nodepool.deserializeBinaryFromReader);
52035
+ msg.setNodepool(value);
52036
+ break;
52037
+ case 13:
52038
+ var value = new proto.clarifai.api.ComputeInfo;
52039
+ reader.readMessage(value, proto.clarifai.api.ComputeInfo.deserializeBinaryFromReader);
52040
+ msg.setComputeInfo(value);
52041
+ break;
51531
52042
  default:
51532
52043
  reader.skipField();
51533
52044
  break;
@@ -51581,6 +52092,22 @@ proto.clarifai.api.Runner.serializeBinaryToWriter = function (message, writer) {
51581
52092
  if (f.length > 0) {
51582
52093
  writer.writeRepeatedString(7, f);
51583
52094
  }
52095
+ f = message.getModel();
52096
+ if (f != null) {
52097
+ writer.writeMessage(9, f, proto.clarifai.api.Model.serializeBinaryToWriter);
52098
+ }
52099
+ f = message.getWorkflow();
52100
+ if (f != null) {
52101
+ writer.writeMessage(10, f, proto.clarifai.api.Workflow.serializeBinaryToWriter);
52102
+ }
52103
+ f = message.getNodepool();
52104
+ if (f != null) {
52105
+ writer.writeMessage(12, f, proto.clarifai.api.Nodepool.serializeBinaryToWriter);
52106
+ }
52107
+ f = message.getComputeInfo();
52108
+ if (f != null) {
52109
+ writer.writeMessage(13, f, proto.clarifai.api.ComputeInfo.serializeBinaryToWriter);
52110
+ }
51584
52111
  };
51585
52112
  /**
51586
52113
  * optional string id = 1;
@@ -51737,6 +52264,1577 @@ proto.clarifai.api.Runner.prototype.addLabels = function (value, opt_index) {
51737
52264
  proto.clarifai.api.Runner.prototype.clearLabelsList = function () {
51738
52265
  return this.setLabelsList([]);
51739
52266
  };
52267
+ /**
52268
+ * optional Model model = 9;
52269
+ * @return {?proto.clarifai.api.Model}
52270
+ */
52271
+ proto.clarifai.api.Runner.prototype.getModel = function () {
52272
+ return /** @type{?proto.clarifai.api.Model} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Model, 9));
52273
+ };
52274
+ /**
52275
+ * @param {?proto.clarifai.api.Model|undefined} value
52276
+ * @return {!proto.clarifai.api.Runner} returns this
52277
+ */
52278
+ proto.clarifai.api.Runner.prototype.setModel = function (value) {
52279
+ return jspb.Message.setOneofWrapperField(this, 9, proto.clarifai.api.Runner.oneofGroups_[0], value);
52280
+ };
52281
+ /**
52282
+ * Clears the message field making it undefined.
52283
+ * @return {!proto.clarifai.api.Runner} returns this
52284
+ */
52285
+ proto.clarifai.api.Runner.prototype.clearModel = function () {
52286
+ return this.setModel(undefined);
52287
+ };
52288
+ /**
52289
+ * Returns whether this field is set.
52290
+ * @return {boolean}
52291
+ */
52292
+ proto.clarifai.api.Runner.prototype.hasModel = function () {
52293
+ return jspb.Message.getField(this, 9) != null;
52294
+ };
52295
+ /**
52296
+ * optional Workflow workflow = 10;
52297
+ * @return {?proto.clarifai.api.Workflow}
52298
+ */
52299
+ proto.clarifai.api.Runner.prototype.getWorkflow = function () {
52300
+ return /** @type{?proto.clarifai.api.Workflow} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Workflow, 10));
52301
+ };
52302
+ /**
52303
+ * @param {?proto.clarifai.api.Workflow|undefined} value
52304
+ * @return {!proto.clarifai.api.Runner} returns this
52305
+ */
52306
+ proto.clarifai.api.Runner.prototype.setWorkflow = function (value) {
52307
+ return jspb.Message.setOneofWrapperField(this, 10, proto.clarifai.api.Runner.oneofGroups_[0], value);
52308
+ };
52309
+ /**
52310
+ * Clears the message field making it undefined.
52311
+ * @return {!proto.clarifai.api.Runner} returns this
52312
+ */
52313
+ proto.clarifai.api.Runner.prototype.clearWorkflow = function () {
52314
+ return this.setWorkflow(undefined);
52315
+ };
52316
+ /**
52317
+ * Returns whether this field is set.
52318
+ * @return {boolean}
52319
+ */
52320
+ proto.clarifai.api.Runner.prototype.hasWorkflow = function () {
52321
+ return jspb.Message.getField(this, 10) != null;
52322
+ };
52323
+ /**
52324
+ * optional Nodepool nodepool = 12;
52325
+ * @return {?proto.clarifai.api.Nodepool}
52326
+ */
52327
+ proto.clarifai.api.Runner.prototype.getNodepool = function () {
52328
+ return /** @type{?proto.clarifai.api.Nodepool} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Nodepool, 12));
52329
+ };
52330
+ /**
52331
+ * @param {?proto.clarifai.api.Nodepool|undefined} value
52332
+ * @return {!proto.clarifai.api.Runner} returns this
52333
+ */
52334
+ proto.clarifai.api.Runner.prototype.setNodepool = function (value) {
52335
+ return jspb.Message.setWrapperField(this, 12, value);
52336
+ };
52337
+ /**
52338
+ * Clears the message field making it undefined.
52339
+ * @return {!proto.clarifai.api.Runner} returns this
52340
+ */
52341
+ proto.clarifai.api.Runner.prototype.clearNodepool = function () {
52342
+ return this.setNodepool(undefined);
52343
+ };
52344
+ /**
52345
+ * Returns whether this field is set.
52346
+ * @return {boolean}
52347
+ */
52348
+ proto.clarifai.api.Runner.prototype.hasNodepool = function () {
52349
+ return jspb.Message.getField(this, 12) != null;
52350
+ };
52351
+ /**
52352
+ * optional ComputeInfo compute_info = 13;
52353
+ * @return {?proto.clarifai.api.ComputeInfo}
52354
+ */
52355
+ proto.clarifai.api.Runner.prototype.getComputeInfo = function () {
52356
+ return /** @type{?proto.clarifai.api.ComputeInfo} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.ComputeInfo, 13));
52357
+ };
52358
+ /**
52359
+ * @param {?proto.clarifai.api.ComputeInfo|undefined} value
52360
+ * @return {!proto.clarifai.api.Runner} returns this
52361
+ */
52362
+ proto.clarifai.api.Runner.prototype.setComputeInfo = function (value) {
52363
+ return jspb.Message.setWrapperField(this, 13, value);
52364
+ };
52365
+ /**
52366
+ * Clears the message field making it undefined.
52367
+ * @return {!proto.clarifai.api.Runner} returns this
52368
+ */
52369
+ proto.clarifai.api.Runner.prototype.clearComputeInfo = function () {
52370
+ return this.setComputeInfo(undefined);
52371
+ };
52372
+ /**
52373
+ * Returns whether this field is set.
52374
+ * @return {boolean}
52375
+ */
52376
+ proto.clarifai.api.Runner.prototype.hasComputeInfo = function () {
52377
+ return jspb.Message.getField(this, 13) != null;
52378
+ };
52379
+ /**
52380
+ * List of repeated fields within this message type.
52381
+ * @private {!Array<number>}
52382
+ * @const
52383
+ */
52384
+ proto.clarifai.api.Nodepool.repeatedFields_ = [4, 8];
52385
+ if (jspb.Message.GENERATE_TO_OBJECT) {
52386
+ /**
52387
+ * Creates an object representation of this proto.
52388
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
52389
+ * Optional fields that are not set will be set to undefined.
52390
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
52391
+ * For the list of reserved names please see:
52392
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
52393
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
52394
+ * JSPB instance for transitional soy proto support:
52395
+ * http://goto/soy-param-migration
52396
+ * @return {!Object}
52397
+ */
52398
+ proto.clarifai.api.Nodepool.prototype.toObject = function (opt_includeInstance) {
52399
+ return proto.clarifai.api.Nodepool.toObject(opt_includeInstance, this);
52400
+ };
52401
+ /**
52402
+ * Static version of the {@see toObject} method.
52403
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
52404
+ * the JSPB instance for transitional soy proto support:
52405
+ * http://goto/soy-param-migration
52406
+ * @param {!proto.clarifai.api.Nodepool} msg The msg instance to transform.
52407
+ * @return {!Object}
52408
+ * @suppress {unusedLocalVariables} f is only used for nested messages
52409
+ */
52410
+ proto.clarifai.api.Nodepool.toObject = function (includeInstance, msg) {
52411
+ var f, obj = {
52412
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
52413
+ userId: jspb.Message.getFieldWithDefault(msg, 2, ""),
52414
+ cloudRegion: (f = msg.getCloudRegion()) && proto.clarifai.api.CloudRegion.toObject(includeInstance, f),
52415
+ capacityTypesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
52416
+ instanceTypesList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f,
52417
+ minInstances: jspb.Message.getFieldWithDefault(msg, 9, 0),
52418
+ maxInstances: jspb.Message.getFieldWithDefault(msg, 10, 0)
52419
+ };
52420
+ if (includeInstance) {
52421
+ obj.$jspbMessageInstance = msg;
52422
+ }
52423
+ return obj;
52424
+ };
52425
+ }
52426
+ /**
52427
+ * Deserializes binary data (in protobuf wire format).
52428
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
52429
+ * @return {!proto.clarifai.api.Nodepool}
52430
+ */
52431
+ proto.clarifai.api.Nodepool.deserializeBinary = function (bytes) {
52432
+ var reader = new jspb.BinaryReader(bytes);
52433
+ var msg = new proto.clarifai.api.Nodepool;
52434
+ return proto.clarifai.api.Nodepool.deserializeBinaryFromReader(msg, reader);
52435
+ };
52436
+ /**
52437
+ * Deserializes binary data (in protobuf wire format) from the
52438
+ * given reader into the given message object.
52439
+ * @param {!proto.clarifai.api.Nodepool} msg The message object to deserialize into.
52440
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
52441
+ * @return {!proto.clarifai.api.Nodepool}
52442
+ */
52443
+ proto.clarifai.api.Nodepool.deserializeBinaryFromReader = function (msg, reader) {
52444
+ while (reader.nextField()) {
52445
+ if (reader.isEndGroup()) {
52446
+ break;
52447
+ }
52448
+ var field = reader.getFieldNumber();
52449
+ switch (field) {
52450
+ case 1:
52451
+ var value = /** @type {string} */ (reader.readString());
52452
+ msg.setId(value);
52453
+ break;
52454
+ case 2:
52455
+ var value = /** @type {string} */ (reader.readString());
52456
+ msg.setUserId(value);
52457
+ break;
52458
+ case 3:
52459
+ var value = new proto.clarifai.api.CloudRegion;
52460
+ reader.readMessage(value, proto.clarifai.api.CloudRegion.deserializeBinaryFromReader);
52461
+ msg.setCloudRegion(value);
52462
+ break;
52463
+ case 4:
52464
+ var values = /** @type {!Array<!proto.clarifai.api.Nodepool.CapacityType>} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]);
52465
+ for (var i = 0; i < values.length; i++) {
52466
+ msg.addCapacityTypes(values[i]);
52467
+ }
52468
+ break;
52469
+ case 8:
52470
+ var value = /** @type {string} */ (reader.readString());
52471
+ msg.addInstanceTypes(value);
52472
+ break;
52473
+ case 9:
52474
+ var value = /** @type {number} */ (reader.readUint32());
52475
+ msg.setMinInstances(value);
52476
+ break;
52477
+ case 10:
52478
+ var value = /** @type {number} */ (reader.readUint32());
52479
+ msg.setMaxInstances(value);
52480
+ break;
52481
+ default:
52482
+ reader.skipField();
52483
+ break;
52484
+ }
52485
+ }
52486
+ return msg;
52487
+ };
52488
+ /**
52489
+ * Serializes the message to binary data (in protobuf wire format).
52490
+ * @return {!Uint8Array}
52491
+ */
52492
+ proto.clarifai.api.Nodepool.prototype.serializeBinary = function () {
52493
+ var writer = new jspb.BinaryWriter();
52494
+ proto.clarifai.api.Nodepool.serializeBinaryToWriter(this, writer);
52495
+ return writer.getResultBuffer();
52496
+ };
52497
+ /**
52498
+ * Serializes the given message to binary data (in protobuf wire
52499
+ * format), writing to the given BinaryWriter.
52500
+ * @param {!proto.clarifai.api.Nodepool} message
52501
+ * @param {!jspb.BinaryWriter} writer
52502
+ * @suppress {unusedLocalVariables} f is only used for nested messages
52503
+ */
52504
+ proto.clarifai.api.Nodepool.serializeBinaryToWriter = function (message, writer) {
52505
+ var f = undefined;
52506
+ f = message.getId();
52507
+ if (f.length > 0) {
52508
+ writer.writeString(1, f);
52509
+ }
52510
+ f = message.getUserId();
52511
+ if (f.length > 0) {
52512
+ writer.writeString(2, f);
52513
+ }
52514
+ f = message.getCloudRegion();
52515
+ if (f != null) {
52516
+ writer.writeMessage(3, f, proto.clarifai.api.CloudRegion.serializeBinaryToWriter);
52517
+ }
52518
+ f = message.getCapacityTypesList();
52519
+ if (f.length > 0) {
52520
+ writer.writePackedEnum(4, f);
52521
+ }
52522
+ f = message.getInstanceTypesList();
52523
+ if (f.length > 0) {
52524
+ writer.writeRepeatedString(8, f);
52525
+ }
52526
+ f = message.getMinInstances();
52527
+ if (f !== 0) {
52528
+ writer.writeUint32(9, f);
52529
+ }
52530
+ f = message.getMaxInstances();
52531
+ if (f !== 0) {
52532
+ writer.writeUint32(10, f);
52533
+ }
52534
+ };
52535
+ /**
52536
+ * @enum {number}
52537
+ */
52538
+ proto.clarifai.api.Nodepool.CapacityType = {
52539
+ UKNOWN_CAPACITY_TYPE: 0,
52540
+ ONDEMAND_TYPE: 1,
52541
+ SPOT_TYPE: 2
52542
+ };
52543
+ /**
52544
+ * optional string id = 1;
52545
+ * @return {string}
52546
+ */
52547
+ proto.clarifai.api.Nodepool.prototype.getId = function () {
52548
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
52549
+ };
52550
+ /**
52551
+ * @param {string} value
52552
+ * @return {!proto.clarifai.api.Nodepool} returns this
52553
+ */
52554
+ proto.clarifai.api.Nodepool.prototype.setId = function (value) {
52555
+ return jspb.Message.setProto3StringField(this, 1, value);
52556
+ };
52557
+ /**
52558
+ * optional string user_id = 2;
52559
+ * @return {string}
52560
+ */
52561
+ proto.clarifai.api.Nodepool.prototype.getUserId = function () {
52562
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
52563
+ };
52564
+ /**
52565
+ * @param {string} value
52566
+ * @return {!proto.clarifai.api.Nodepool} returns this
52567
+ */
52568
+ proto.clarifai.api.Nodepool.prototype.setUserId = function (value) {
52569
+ return jspb.Message.setProto3StringField(this, 2, value);
52570
+ };
52571
+ /**
52572
+ * optional CloudRegion cloud_region = 3;
52573
+ * @return {?proto.clarifai.api.CloudRegion}
52574
+ */
52575
+ proto.clarifai.api.Nodepool.prototype.getCloudRegion = function () {
52576
+ return /** @type{?proto.clarifai.api.CloudRegion} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.CloudRegion, 3));
52577
+ };
52578
+ /**
52579
+ * @param {?proto.clarifai.api.CloudRegion|undefined} value
52580
+ * @return {!proto.clarifai.api.Nodepool} returns this
52581
+ */
52582
+ proto.clarifai.api.Nodepool.prototype.setCloudRegion = function (value) {
52583
+ return jspb.Message.setWrapperField(this, 3, value);
52584
+ };
52585
+ /**
52586
+ * Clears the message field making it undefined.
52587
+ * @return {!proto.clarifai.api.Nodepool} returns this
52588
+ */
52589
+ proto.clarifai.api.Nodepool.prototype.clearCloudRegion = function () {
52590
+ return this.setCloudRegion(undefined);
52591
+ };
52592
+ /**
52593
+ * Returns whether this field is set.
52594
+ * @return {boolean}
52595
+ */
52596
+ proto.clarifai.api.Nodepool.prototype.hasCloudRegion = function () {
52597
+ return jspb.Message.getField(this, 3) != null;
52598
+ };
52599
+ /**
52600
+ * repeated CapacityType capacity_types = 4;
52601
+ * @return {!Array<!proto.clarifai.api.Nodepool.CapacityType>}
52602
+ */
52603
+ proto.clarifai.api.Nodepool.prototype.getCapacityTypesList = function () {
52604
+ return /** @type {!Array<!proto.clarifai.api.Nodepool.CapacityType>} */ (jspb.Message.getRepeatedField(this, 4));
52605
+ };
52606
+ /**
52607
+ * @param {!Array<!proto.clarifai.api.Nodepool.CapacityType>} value
52608
+ * @return {!proto.clarifai.api.Nodepool} returns this
52609
+ */
52610
+ proto.clarifai.api.Nodepool.prototype.setCapacityTypesList = function (value) {
52611
+ return jspb.Message.setField(this, 4, value || []);
52612
+ };
52613
+ /**
52614
+ * @param {!proto.clarifai.api.Nodepool.CapacityType} value
52615
+ * @param {number=} opt_index
52616
+ * @return {!proto.clarifai.api.Nodepool} returns this
52617
+ */
52618
+ proto.clarifai.api.Nodepool.prototype.addCapacityTypes = function (value, opt_index) {
52619
+ return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
52620
+ };
52621
+ /**
52622
+ * Clears the list making it empty but non-null.
52623
+ * @return {!proto.clarifai.api.Nodepool} returns this
52624
+ */
52625
+ proto.clarifai.api.Nodepool.prototype.clearCapacityTypesList = function () {
52626
+ return this.setCapacityTypesList([]);
52627
+ };
52628
+ /**
52629
+ * repeated string instance_types = 8;
52630
+ * @return {!Array<string>}
52631
+ */
52632
+ proto.clarifai.api.Nodepool.prototype.getInstanceTypesList = function () {
52633
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 8));
52634
+ };
52635
+ /**
52636
+ * @param {!Array<string>} value
52637
+ * @return {!proto.clarifai.api.Nodepool} returns this
52638
+ */
52639
+ proto.clarifai.api.Nodepool.prototype.setInstanceTypesList = function (value) {
52640
+ return jspb.Message.setField(this, 8, value || []);
52641
+ };
52642
+ /**
52643
+ * @param {string} value
52644
+ * @param {number=} opt_index
52645
+ * @return {!proto.clarifai.api.Nodepool} returns this
52646
+ */
52647
+ proto.clarifai.api.Nodepool.prototype.addInstanceTypes = function (value, opt_index) {
52648
+ return jspb.Message.addToRepeatedField(this, 8, value, opt_index);
52649
+ };
52650
+ /**
52651
+ * Clears the list making it empty but non-null.
52652
+ * @return {!proto.clarifai.api.Nodepool} returns this
52653
+ */
52654
+ proto.clarifai.api.Nodepool.prototype.clearInstanceTypesList = function () {
52655
+ return this.setInstanceTypesList([]);
52656
+ };
52657
+ /**
52658
+ * optional uint32 min_instances = 9;
52659
+ * @return {number}
52660
+ */
52661
+ proto.clarifai.api.Nodepool.prototype.getMinInstances = function () {
52662
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
52663
+ };
52664
+ /**
52665
+ * @param {number} value
52666
+ * @return {!proto.clarifai.api.Nodepool} returns this
52667
+ */
52668
+ proto.clarifai.api.Nodepool.prototype.setMinInstances = function (value) {
52669
+ return jspb.Message.setProto3IntField(this, 9, value);
52670
+ };
52671
+ /**
52672
+ * optional uint32 max_instances = 10;
52673
+ * @return {number}
52674
+ */
52675
+ proto.clarifai.api.Nodepool.prototype.getMaxInstances = function () {
52676
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
52677
+ };
52678
+ /**
52679
+ * @param {number} value
52680
+ * @return {!proto.clarifai.api.Nodepool} returns this
52681
+ */
52682
+ proto.clarifai.api.Nodepool.prototype.setMaxInstances = function (value) {
52683
+ return jspb.Message.setProto3IntField(this, 10, value);
52684
+ };
52685
+ if (jspb.Message.GENERATE_TO_OBJECT) {
52686
+ /**
52687
+ * Creates an object representation of this proto.
52688
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
52689
+ * Optional fields that are not set will be set to undefined.
52690
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
52691
+ * For the list of reserved names please see:
52692
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
52693
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
52694
+ * JSPB instance for transitional soy proto support:
52695
+ * http://goto/soy-param-migration
52696
+ * @return {!Object}
52697
+ */
52698
+ proto.clarifai.api.CloudRegion.prototype.toObject = function (opt_includeInstance) {
52699
+ return proto.clarifai.api.CloudRegion.toObject(opt_includeInstance, this);
52700
+ };
52701
+ /**
52702
+ * Static version of the {@see toObject} method.
52703
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
52704
+ * the JSPB instance for transitional soy proto support:
52705
+ * http://goto/soy-param-migration
52706
+ * @param {!proto.clarifai.api.CloudRegion} msg The msg instance to transform.
52707
+ * @return {!Object}
52708
+ * @suppress {unusedLocalVariables} f is only used for nested messages
52709
+ */
52710
+ proto.clarifai.api.CloudRegion.toObject = function (includeInstance, msg) {
52711
+ var f, obj = {
52712
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
52713
+ cloud: jspb.Message.getFieldWithDefault(msg, 3, 0),
52714
+ region: jspb.Message.getFieldWithDefault(msg, 4, "")
52715
+ };
52716
+ if (includeInstance) {
52717
+ obj.$jspbMessageInstance = msg;
52718
+ }
52719
+ return obj;
52720
+ };
52721
+ }
52722
+ /**
52723
+ * Deserializes binary data (in protobuf wire format).
52724
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
52725
+ * @return {!proto.clarifai.api.CloudRegion}
52726
+ */
52727
+ proto.clarifai.api.CloudRegion.deserializeBinary = function (bytes) {
52728
+ var reader = new jspb.BinaryReader(bytes);
52729
+ var msg = new proto.clarifai.api.CloudRegion;
52730
+ return proto.clarifai.api.CloudRegion.deserializeBinaryFromReader(msg, reader);
52731
+ };
52732
+ /**
52733
+ * Deserializes binary data (in protobuf wire format) from the
52734
+ * given reader into the given message object.
52735
+ * @param {!proto.clarifai.api.CloudRegion} msg The message object to deserialize into.
52736
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
52737
+ * @return {!proto.clarifai.api.CloudRegion}
52738
+ */
52739
+ proto.clarifai.api.CloudRegion.deserializeBinaryFromReader = function (msg, reader) {
52740
+ while (reader.nextField()) {
52741
+ if (reader.isEndGroup()) {
52742
+ break;
52743
+ }
52744
+ var field = reader.getFieldNumber();
52745
+ switch (field) {
52746
+ case 1:
52747
+ var value = /** @type {string} */ (reader.readString());
52748
+ msg.setId(value);
52749
+ break;
52750
+ case 3:
52751
+ var value = /** @type {!proto.clarifai.api.CloudRegion.Cloud} */ (reader.readEnum());
52752
+ msg.setCloud(value);
52753
+ break;
52754
+ case 4:
52755
+ var value = /** @type {string} */ (reader.readString());
52756
+ msg.setRegion(value);
52757
+ break;
52758
+ default:
52759
+ reader.skipField();
52760
+ break;
52761
+ }
52762
+ }
52763
+ return msg;
52764
+ };
52765
+ /**
52766
+ * Serializes the message to binary data (in protobuf wire format).
52767
+ * @return {!Uint8Array}
52768
+ */
52769
+ proto.clarifai.api.CloudRegion.prototype.serializeBinary = function () {
52770
+ var writer = new jspb.BinaryWriter();
52771
+ proto.clarifai.api.CloudRegion.serializeBinaryToWriter(this, writer);
52772
+ return writer.getResultBuffer();
52773
+ };
52774
+ /**
52775
+ * Serializes the given message to binary data (in protobuf wire
52776
+ * format), writing to the given BinaryWriter.
52777
+ * @param {!proto.clarifai.api.CloudRegion} message
52778
+ * @param {!jspb.BinaryWriter} writer
52779
+ * @suppress {unusedLocalVariables} f is only used for nested messages
52780
+ */
52781
+ proto.clarifai.api.CloudRegion.serializeBinaryToWriter = function (message, writer) {
52782
+ var f = undefined;
52783
+ f = message.getId();
52784
+ if (f.length > 0) {
52785
+ writer.writeString(1, f);
52786
+ }
52787
+ f = message.getCloud();
52788
+ if (f !== 0.0) {
52789
+ writer.writeEnum(3, f);
52790
+ }
52791
+ f = message.getRegion();
52792
+ if (f.length > 0) {
52793
+ writer.writeString(4, f);
52794
+ }
52795
+ };
52796
+ /**
52797
+ * @enum {number}
52798
+ */
52799
+ proto.clarifai.api.CloudRegion.Cloud = {
52800
+ UNKOWN_CLOUD: 0,
52801
+ SELF_HOSTED: 1,
52802
+ AWS: 2,
52803
+ GCP: 3,
52804
+ AZURE: 4,
52805
+ LAMBDA: 5
52806
+ };
52807
+ /**
52808
+ * optional string id = 1;
52809
+ * @return {string}
52810
+ */
52811
+ proto.clarifai.api.CloudRegion.prototype.getId = function () {
52812
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
52813
+ };
52814
+ /**
52815
+ * @param {string} value
52816
+ * @return {!proto.clarifai.api.CloudRegion} returns this
52817
+ */
52818
+ proto.clarifai.api.CloudRegion.prototype.setId = function (value) {
52819
+ return jspb.Message.setProto3StringField(this, 1, value);
52820
+ };
52821
+ /**
52822
+ * optional Cloud cloud = 3;
52823
+ * @return {!proto.clarifai.api.CloudRegion.Cloud}
52824
+ */
52825
+ proto.clarifai.api.CloudRegion.prototype.getCloud = function () {
52826
+ return /** @type {!proto.clarifai.api.CloudRegion.Cloud} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
52827
+ };
52828
+ /**
52829
+ * @param {!proto.clarifai.api.CloudRegion.Cloud} value
52830
+ * @return {!proto.clarifai.api.CloudRegion} returns this
52831
+ */
52832
+ proto.clarifai.api.CloudRegion.prototype.setCloud = function (value) {
52833
+ return jspb.Message.setProto3EnumField(this, 3, value);
52834
+ };
52835
+ /**
52836
+ * optional string region = 4;
52837
+ * @return {string}
52838
+ */
52839
+ proto.clarifai.api.CloudRegion.prototype.getRegion = function () {
52840
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
52841
+ };
52842
+ /**
52843
+ * @param {string} value
52844
+ * @return {!proto.clarifai.api.CloudRegion} returns this
52845
+ */
52846
+ proto.clarifai.api.CloudRegion.prototype.setRegion = function (value) {
52847
+ return jspb.Message.setProto3StringField(this, 4, value);
52848
+ };
52849
+ /**
52850
+ * List of repeated fields within this message type.
52851
+ * @private {!Array<number>}
52852
+ * @const
52853
+ */
52854
+ proto.clarifai.api.ComputeInfo.repeatedFields_ = [5];
52855
+ if (jspb.Message.GENERATE_TO_OBJECT) {
52856
+ /**
52857
+ * Creates an object representation of this proto.
52858
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
52859
+ * Optional fields that are not set will be set to undefined.
52860
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
52861
+ * For the list of reserved names please see:
52862
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
52863
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
52864
+ * JSPB instance for transitional soy proto support:
52865
+ * http://goto/soy-param-migration
52866
+ * @return {!Object}
52867
+ */
52868
+ proto.clarifai.api.ComputeInfo.prototype.toObject = function (opt_includeInstance) {
52869
+ return proto.clarifai.api.ComputeInfo.toObject(opt_includeInstance, this);
52870
+ };
52871
+ /**
52872
+ * Static version of the {@see toObject} method.
52873
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
52874
+ * the JSPB instance for transitional soy proto support:
52875
+ * http://goto/soy-param-migration
52876
+ * @param {!proto.clarifai.api.ComputeInfo} msg The msg instance to transform.
52877
+ * @return {!Object}
52878
+ * @suppress {unusedLocalVariables} f is only used for nested messages
52879
+ */
52880
+ proto.clarifai.api.ComputeInfo.toObject = function (includeInstance, msg) {
52881
+ var f, obj = {
52882
+ numCpus: jspb.Message.getFieldWithDefault(msg, 1, 0),
52883
+ cpuMemory: jspb.Message.getFieldWithDefault(msg, 2, ""),
52884
+ numAccelerators: jspb.Message.getFieldWithDefault(msg, 3, 0),
52885
+ acceleratorMemory: jspb.Message.getFieldWithDefault(msg, 4, ""),
52886
+ acceleratorTypeList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
52887
+ };
52888
+ if (includeInstance) {
52889
+ obj.$jspbMessageInstance = msg;
52890
+ }
52891
+ return obj;
52892
+ };
52893
+ }
52894
+ /**
52895
+ * Deserializes binary data (in protobuf wire format).
52896
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
52897
+ * @return {!proto.clarifai.api.ComputeInfo}
52898
+ */
52899
+ proto.clarifai.api.ComputeInfo.deserializeBinary = function (bytes) {
52900
+ var reader = new jspb.BinaryReader(bytes);
52901
+ var msg = new proto.clarifai.api.ComputeInfo;
52902
+ return proto.clarifai.api.ComputeInfo.deserializeBinaryFromReader(msg, reader);
52903
+ };
52904
+ /**
52905
+ * Deserializes binary data (in protobuf wire format) from the
52906
+ * given reader into the given message object.
52907
+ * @param {!proto.clarifai.api.ComputeInfo} msg The message object to deserialize into.
52908
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
52909
+ * @return {!proto.clarifai.api.ComputeInfo}
52910
+ */
52911
+ proto.clarifai.api.ComputeInfo.deserializeBinaryFromReader = function (msg, reader) {
52912
+ while (reader.nextField()) {
52913
+ if (reader.isEndGroup()) {
52914
+ break;
52915
+ }
52916
+ var field = reader.getFieldNumber();
52917
+ switch (field) {
52918
+ case 1:
52919
+ var value = /** @type {number} */ (reader.readUint32());
52920
+ msg.setNumCpus(value);
52921
+ break;
52922
+ case 2:
52923
+ var value = /** @type {string} */ (reader.readString());
52924
+ msg.setCpuMemory(value);
52925
+ break;
52926
+ case 3:
52927
+ var value = /** @type {number} */ (reader.readUint32());
52928
+ msg.setNumAccelerators(value);
52929
+ break;
52930
+ case 4:
52931
+ var value = /** @type {string} */ (reader.readString());
52932
+ msg.setAcceleratorMemory(value);
52933
+ break;
52934
+ case 5:
52935
+ var value = /** @type {string} */ (reader.readString());
52936
+ msg.addAcceleratorType(value);
52937
+ break;
52938
+ default:
52939
+ reader.skipField();
52940
+ break;
52941
+ }
52942
+ }
52943
+ return msg;
52944
+ };
52945
+ /**
52946
+ * Serializes the message to binary data (in protobuf wire format).
52947
+ * @return {!Uint8Array}
52948
+ */
52949
+ proto.clarifai.api.ComputeInfo.prototype.serializeBinary = function () {
52950
+ var writer = new jspb.BinaryWriter();
52951
+ proto.clarifai.api.ComputeInfo.serializeBinaryToWriter(this, writer);
52952
+ return writer.getResultBuffer();
52953
+ };
52954
+ /**
52955
+ * Serializes the given message to binary data (in protobuf wire
52956
+ * format), writing to the given BinaryWriter.
52957
+ * @param {!proto.clarifai.api.ComputeInfo} message
52958
+ * @param {!jspb.BinaryWriter} writer
52959
+ * @suppress {unusedLocalVariables} f is only used for nested messages
52960
+ */
52961
+ proto.clarifai.api.ComputeInfo.serializeBinaryToWriter = function (message, writer) {
52962
+ var f = undefined;
52963
+ f = message.getNumCpus();
52964
+ if (f !== 0) {
52965
+ writer.writeUint32(1, f);
52966
+ }
52967
+ f = message.getCpuMemory();
52968
+ if (f.length > 0) {
52969
+ writer.writeString(2, f);
52970
+ }
52971
+ f = message.getNumAccelerators();
52972
+ if (f !== 0) {
52973
+ writer.writeUint32(3, f);
52974
+ }
52975
+ f = message.getAcceleratorMemory();
52976
+ if (f.length > 0) {
52977
+ writer.writeString(4, f);
52978
+ }
52979
+ f = message.getAcceleratorTypeList();
52980
+ if (f.length > 0) {
52981
+ writer.writeRepeatedString(5, f);
52982
+ }
52983
+ };
52984
+ /**
52985
+ * optional uint32 num_cpus = 1;
52986
+ * @return {number}
52987
+ */
52988
+ proto.clarifai.api.ComputeInfo.prototype.getNumCpus = function () {
52989
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
52990
+ };
52991
+ /**
52992
+ * @param {number} value
52993
+ * @return {!proto.clarifai.api.ComputeInfo} returns this
52994
+ */
52995
+ proto.clarifai.api.ComputeInfo.prototype.setNumCpus = function (value) {
52996
+ return jspb.Message.setProto3IntField(this, 1, value);
52997
+ };
52998
+ /**
52999
+ * optional string cpu_memory = 2;
53000
+ * @return {string}
53001
+ */
53002
+ proto.clarifai.api.ComputeInfo.prototype.getCpuMemory = function () {
53003
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
53004
+ };
53005
+ /**
53006
+ * @param {string} value
53007
+ * @return {!proto.clarifai.api.ComputeInfo} returns this
53008
+ */
53009
+ proto.clarifai.api.ComputeInfo.prototype.setCpuMemory = function (value) {
53010
+ return jspb.Message.setProto3StringField(this, 2, value);
53011
+ };
53012
+ /**
53013
+ * optional uint32 num_accelerators = 3;
53014
+ * @return {number}
53015
+ */
53016
+ proto.clarifai.api.ComputeInfo.prototype.getNumAccelerators = function () {
53017
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
53018
+ };
53019
+ /**
53020
+ * @param {number} value
53021
+ * @return {!proto.clarifai.api.ComputeInfo} returns this
53022
+ */
53023
+ proto.clarifai.api.ComputeInfo.prototype.setNumAccelerators = function (value) {
53024
+ return jspb.Message.setProto3IntField(this, 3, value);
53025
+ };
53026
+ /**
53027
+ * optional string accelerator_memory = 4;
53028
+ * @return {string}
53029
+ */
53030
+ proto.clarifai.api.ComputeInfo.prototype.getAcceleratorMemory = function () {
53031
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
53032
+ };
53033
+ /**
53034
+ * @param {string} value
53035
+ * @return {!proto.clarifai.api.ComputeInfo} returns this
53036
+ */
53037
+ proto.clarifai.api.ComputeInfo.prototype.setAcceleratorMemory = function (value) {
53038
+ return jspb.Message.setProto3StringField(this, 4, value);
53039
+ };
53040
+ /**
53041
+ * repeated string accelerator_type = 5;
53042
+ * @return {!Array<string>}
53043
+ */
53044
+ proto.clarifai.api.ComputeInfo.prototype.getAcceleratorTypeList = function () {
53045
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
53046
+ };
53047
+ /**
53048
+ * @param {!Array<string>} value
53049
+ * @return {!proto.clarifai.api.ComputeInfo} returns this
53050
+ */
53051
+ proto.clarifai.api.ComputeInfo.prototype.setAcceleratorTypeList = function (value) {
53052
+ return jspb.Message.setField(this, 5, value || []);
53053
+ };
53054
+ /**
53055
+ * @param {string} value
53056
+ * @param {number=} opt_index
53057
+ * @return {!proto.clarifai.api.ComputeInfo} returns this
53058
+ */
53059
+ proto.clarifai.api.ComputeInfo.prototype.addAcceleratorType = function (value, opt_index) {
53060
+ return jspb.Message.addToRepeatedField(this, 5, value, opt_index);
53061
+ };
53062
+ /**
53063
+ * Clears the list making it empty but non-null.
53064
+ * @return {!proto.clarifai.api.ComputeInfo} returns this
53065
+ */
53066
+ proto.clarifai.api.ComputeInfo.prototype.clearAcceleratorTypeList = function () {
53067
+ return this.setAcceleratorTypeList([]);
53068
+ };
53069
+ if (jspb.Message.GENERATE_TO_OBJECT) {
53070
+ /**
53071
+ * Creates an object representation of this proto.
53072
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
53073
+ * Optional fields that are not set will be set to undefined.
53074
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
53075
+ * For the list of reserved names please see:
53076
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
53077
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
53078
+ * JSPB instance for transitional soy proto support:
53079
+ * http://goto/soy-param-migration
53080
+ * @return {!Object}
53081
+ */
53082
+ proto.clarifai.api.AutoscaleConfig.prototype.toObject = function (opt_includeInstance) {
53083
+ return proto.clarifai.api.AutoscaleConfig.toObject(opt_includeInstance, this);
53084
+ };
53085
+ /**
53086
+ * Static version of the {@see toObject} method.
53087
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
53088
+ * the JSPB instance for transitional soy proto support:
53089
+ * http://goto/soy-param-migration
53090
+ * @param {!proto.clarifai.api.AutoscaleConfig} msg The msg instance to transform.
53091
+ * @return {!Object}
53092
+ * @suppress {unusedLocalVariables} f is only used for nested messages
53093
+ */
53094
+ proto.clarifai.api.AutoscaleConfig.toObject = function (includeInstance, msg) {
53095
+ var f, obj = {
53096
+ minReplicas: jspb.Message.getFieldWithDefault(msg, 1, 0),
53097
+ maxReplicas: jspb.Message.getFieldWithDefault(msg, 2, 0),
53098
+ trafficHistorySeconds: jspb.Message.getFieldWithDefault(msg, 3, 0),
53099
+ scaleDownDelaySeconds: jspb.Message.getFieldWithDefault(msg, 4, 0),
53100
+ scaleUpDelaySeconds: jspb.Message.getFieldWithDefault(msg, 5, 0),
53101
+ enablePacking: jspb.Message.getBooleanFieldWithDefault(msg, 6, false)
53102
+ };
53103
+ if (includeInstance) {
53104
+ obj.$jspbMessageInstance = msg;
53105
+ }
53106
+ return obj;
53107
+ };
53108
+ }
53109
+ /**
53110
+ * Deserializes binary data (in protobuf wire format).
53111
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
53112
+ * @return {!proto.clarifai.api.AutoscaleConfig}
53113
+ */
53114
+ proto.clarifai.api.AutoscaleConfig.deserializeBinary = function (bytes) {
53115
+ var reader = new jspb.BinaryReader(bytes);
53116
+ var msg = new proto.clarifai.api.AutoscaleConfig;
53117
+ return proto.clarifai.api.AutoscaleConfig.deserializeBinaryFromReader(msg, reader);
53118
+ };
53119
+ /**
53120
+ * Deserializes binary data (in protobuf wire format) from the
53121
+ * given reader into the given message object.
53122
+ * @param {!proto.clarifai.api.AutoscaleConfig} msg The message object to deserialize into.
53123
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
53124
+ * @return {!proto.clarifai.api.AutoscaleConfig}
53125
+ */
53126
+ proto.clarifai.api.AutoscaleConfig.deserializeBinaryFromReader = function (msg, reader) {
53127
+ while (reader.nextField()) {
53128
+ if (reader.isEndGroup()) {
53129
+ break;
53130
+ }
53131
+ var field = reader.getFieldNumber();
53132
+ switch (field) {
53133
+ case 1:
53134
+ var value = /** @type {number} */ (reader.readUint32());
53135
+ msg.setMinReplicas(value);
53136
+ break;
53137
+ case 2:
53138
+ var value = /** @type {number} */ (reader.readUint32());
53139
+ msg.setMaxReplicas(value);
53140
+ break;
53141
+ case 3:
53142
+ var value = /** @type {number} */ (reader.readUint32());
53143
+ msg.setTrafficHistorySeconds(value);
53144
+ break;
53145
+ case 4:
53146
+ var value = /** @type {number} */ (reader.readUint32());
53147
+ msg.setScaleDownDelaySeconds(value);
53148
+ break;
53149
+ case 5:
53150
+ var value = /** @type {number} */ (reader.readUint32());
53151
+ msg.setScaleUpDelaySeconds(value);
53152
+ break;
53153
+ case 6:
53154
+ var value = /** @type {boolean} */ (reader.readBool());
53155
+ msg.setEnablePacking(value);
53156
+ break;
53157
+ default:
53158
+ reader.skipField();
53159
+ break;
53160
+ }
53161
+ }
53162
+ return msg;
53163
+ };
53164
+ /**
53165
+ * Serializes the message to binary data (in protobuf wire format).
53166
+ * @return {!Uint8Array}
53167
+ */
53168
+ proto.clarifai.api.AutoscaleConfig.prototype.serializeBinary = function () {
53169
+ var writer = new jspb.BinaryWriter();
53170
+ proto.clarifai.api.AutoscaleConfig.serializeBinaryToWriter(this, writer);
53171
+ return writer.getResultBuffer();
53172
+ };
53173
+ /**
53174
+ * Serializes the given message to binary data (in protobuf wire
53175
+ * format), writing to the given BinaryWriter.
53176
+ * @param {!proto.clarifai.api.AutoscaleConfig} message
53177
+ * @param {!jspb.BinaryWriter} writer
53178
+ * @suppress {unusedLocalVariables} f is only used for nested messages
53179
+ */
53180
+ proto.clarifai.api.AutoscaleConfig.serializeBinaryToWriter = function (message, writer) {
53181
+ var f = undefined;
53182
+ f = message.getMinReplicas();
53183
+ if (f !== 0) {
53184
+ writer.writeUint32(1, f);
53185
+ }
53186
+ f = message.getMaxReplicas();
53187
+ if (f !== 0) {
53188
+ writer.writeUint32(2, f);
53189
+ }
53190
+ f = message.getTrafficHistorySeconds();
53191
+ if (f !== 0) {
53192
+ writer.writeUint32(3, f);
53193
+ }
53194
+ f = message.getScaleDownDelaySeconds();
53195
+ if (f !== 0) {
53196
+ writer.writeUint32(4, f);
53197
+ }
53198
+ f = message.getScaleUpDelaySeconds();
53199
+ if (f !== 0) {
53200
+ writer.writeUint32(5, f);
53201
+ }
53202
+ f = message.getEnablePacking();
53203
+ if (f) {
53204
+ writer.writeBool(6, f);
53205
+ }
53206
+ };
53207
+ /**
53208
+ * optional uint32 min_replicas = 1;
53209
+ * @return {number}
53210
+ */
53211
+ proto.clarifai.api.AutoscaleConfig.prototype.getMinReplicas = function () {
53212
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
53213
+ };
53214
+ /**
53215
+ * @param {number} value
53216
+ * @return {!proto.clarifai.api.AutoscaleConfig} returns this
53217
+ */
53218
+ proto.clarifai.api.AutoscaleConfig.prototype.setMinReplicas = function (value) {
53219
+ return jspb.Message.setProto3IntField(this, 1, value);
53220
+ };
53221
+ /**
53222
+ * optional uint32 max_replicas = 2;
53223
+ * @return {number}
53224
+ */
53225
+ proto.clarifai.api.AutoscaleConfig.prototype.getMaxReplicas = function () {
53226
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
53227
+ };
53228
+ /**
53229
+ * @param {number} value
53230
+ * @return {!proto.clarifai.api.AutoscaleConfig} returns this
53231
+ */
53232
+ proto.clarifai.api.AutoscaleConfig.prototype.setMaxReplicas = function (value) {
53233
+ return jspb.Message.setProto3IntField(this, 2, value);
53234
+ };
53235
+ /**
53236
+ * optional uint32 traffic_history_seconds = 3;
53237
+ * @return {number}
53238
+ */
53239
+ proto.clarifai.api.AutoscaleConfig.prototype.getTrafficHistorySeconds = function () {
53240
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
53241
+ };
53242
+ /**
53243
+ * @param {number} value
53244
+ * @return {!proto.clarifai.api.AutoscaleConfig} returns this
53245
+ */
53246
+ proto.clarifai.api.AutoscaleConfig.prototype.setTrafficHistorySeconds = function (value) {
53247
+ return jspb.Message.setProto3IntField(this, 3, value);
53248
+ };
53249
+ /**
53250
+ * optional uint32 scale_down_delay_seconds = 4;
53251
+ * @return {number}
53252
+ */
53253
+ proto.clarifai.api.AutoscaleConfig.prototype.getScaleDownDelaySeconds = function () {
53254
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
53255
+ };
53256
+ /**
53257
+ * @param {number} value
53258
+ * @return {!proto.clarifai.api.AutoscaleConfig} returns this
53259
+ */
53260
+ proto.clarifai.api.AutoscaleConfig.prototype.setScaleDownDelaySeconds = function (value) {
53261
+ return jspb.Message.setProto3IntField(this, 4, value);
53262
+ };
53263
+ /**
53264
+ * optional uint32 scale_up_delay_seconds = 5;
53265
+ * @return {number}
53266
+ */
53267
+ proto.clarifai.api.AutoscaleConfig.prototype.getScaleUpDelaySeconds = function () {
53268
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
53269
+ };
53270
+ /**
53271
+ * @param {number} value
53272
+ * @return {!proto.clarifai.api.AutoscaleConfig} returns this
53273
+ */
53274
+ proto.clarifai.api.AutoscaleConfig.prototype.setScaleUpDelaySeconds = function (value) {
53275
+ return jspb.Message.setProto3IntField(this, 5, value);
53276
+ };
53277
+ /**
53278
+ * optional bool enable_packing = 6;
53279
+ * @return {boolean}
53280
+ */
53281
+ proto.clarifai.api.AutoscaleConfig.prototype.getEnablePacking = function () {
53282
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
53283
+ };
53284
+ /**
53285
+ * @param {boolean} value
53286
+ * @return {!proto.clarifai.api.AutoscaleConfig} returns this
53287
+ */
53288
+ proto.clarifai.api.AutoscaleConfig.prototype.setEnablePacking = function (value) {
53289
+ return jspb.Message.setProto3BooleanField(this, 6, value);
53290
+ };
53291
+ /**
53292
+ * List of repeated fields within this message type.
53293
+ * @private {!Array<number>}
53294
+ * @const
53295
+ */
53296
+ proto.clarifai.api.Deployment.repeatedFields_ = [4];
53297
+ /**
53298
+ * Oneof group definitions for this message. Each group defines the field
53299
+ * numbers belonging to that group. When of these fields' value is set, all
53300
+ * other fields in the group are cleared. During deserialization, if multiple
53301
+ * fields are encountered for a group, only the last value seen will be kept.
53302
+ * @private {!Array<!Array<number>>}
53303
+ * @const
53304
+ */
53305
+ proto.clarifai.api.Deployment.oneofGroups_ = [[5, 6]];
53306
+ /**
53307
+ * @enum {number}
53308
+ */
53309
+ proto.clarifai.api.Deployment.ObjectCase = {
53310
+ OBJECT_NOT_SET: 0,
53311
+ MODEL: 5,
53312
+ WORKFLOW: 6
53313
+ };
53314
+ /**
53315
+ * @return {proto.clarifai.api.Deployment.ObjectCase}
53316
+ */
53317
+ proto.clarifai.api.Deployment.prototype.getObjectCase = function () {
53318
+ return /** @type {proto.clarifai.api.Deployment.ObjectCase} */ (jspb.Message.computeOneofCase(this, proto.clarifai.api.Deployment.oneofGroups_[0]));
53319
+ };
53320
+ if (jspb.Message.GENERATE_TO_OBJECT) {
53321
+ /**
53322
+ * Creates an object representation of this proto.
53323
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
53324
+ * Optional fields that are not set will be set to undefined.
53325
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
53326
+ * For the list of reserved names please see:
53327
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
53328
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
53329
+ * JSPB instance for transitional soy proto support:
53330
+ * http://goto/soy-param-migration
53331
+ * @return {!Object}
53332
+ */
53333
+ proto.clarifai.api.Deployment.prototype.toObject = function (opt_includeInstance) {
53334
+ return proto.clarifai.api.Deployment.toObject(opt_includeInstance, this);
53335
+ };
53336
+ /**
53337
+ * Static version of the {@see toObject} method.
53338
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
53339
+ * the JSPB instance for transitional soy proto support:
53340
+ * http://goto/soy-param-migration
53341
+ * @param {!proto.clarifai.api.Deployment} msg The msg instance to transform.
53342
+ * @return {!Object}
53343
+ * @suppress {unusedLocalVariables} f is only used for nested messages
53344
+ */
53345
+ proto.clarifai.api.Deployment.toObject = function (includeInstance, msg) {
53346
+ var f, obj = {
53347
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
53348
+ userId: jspb.Message.getFieldWithDefault(msg, 2, ""),
53349
+ autoscaleConfig: (f = msg.getAutoscaleConfig()) && proto.clarifai.api.AutoscaleConfig.toObject(includeInstance, f),
53350
+ nodepoolsList: jspb.Message.toObjectList(msg.getNodepoolsList(), proto.clarifai.api.Nodepool.toObject, includeInstance),
53351
+ model: (f = msg.getModel()) && proto.clarifai.api.Model.toObject(includeInstance, f),
53352
+ workflow: (f = msg.getWorkflow()) && proto.clarifai.api.Workflow.toObject(includeInstance, f),
53353
+ schedulingChoice: jspb.Message.getFieldWithDefault(msg, 7, 0)
53354
+ };
53355
+ if (includeInstance) {
53356
+ obj.$jspbMessageInstance = msg;
53357
+ }
53358
+ return obj;
53359
+ };
53360
+ }
53361
+ /**
53362
+ * Deserializes binary data (in protobuf wire format).
53363
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
53364
+ * @return {!proto.clarifai.api.Deployment}
53365
+ */
53366
+ proto.clarifai.api.Deployment.deserializeBinary = function (bytes) {
53367
+ var reader = new jspb.BinaryReader(bytes);
53368
+ var msg = new proto.clarifai.api.Deployment;
53369
+ return proto.clarifai.api.Deployment.deserializeBinaryFromReader(msg, reader);
53370
+ };
53371
+ /**
53372
+ * Deserializes binary data (in protobuf wire format) from the
53373
+ * given reader into the given message object.
53374
+ * @param {!proto.clarifai.api.Deployment} msg The message object to deserialize into.
53375
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
53376
+ * @return {!proto.clarifai.api.Deployment}
53377
+ */
53378
+ proto.clarifai.api.Deployment.deserializeBinaryFromReader = function (msg, reader) {
53379
+ while (reader.nextField()) {
53380
+ if (reader.isEndGroup()) {
53381
+ break;
53382
+ }
53383
+ var field = reader.getFieldNumber();
53384
+ switch (field) {
53385
+ case 1:
53386
+ var value = /** @type {string} */ (reader.readString());
53387
+ msg.setId(value);
53388
+ break;
53389
+ case 2:
53390
+ var value = /** @type {string} */ (reader.readString());
53391
+ msg.setUserId(value);
53392
+ break;
53393
+ case 3:
53394
+ var value = new proto.clarifai.api.AutoscaleConfig;
53395
+ reader.readMessage(value, proto.clarifai.api.AutoscaleConfig.deserializeBinaryFromReader);
53396
+ msg.setAutoscaleConfig(value);
53397
+ break;
53398
+ case 4:
53399
+ var value = new proto.clarifai.api.Nodepool;
53400
+ reader.readMessage(value, proto.clarifai.api.Nodepool.deserializeBinaryFromReader);
53401
+ msg.addNodepools(value);
53402
+ break;
53403
+ case 5:
53404
+ var value = new proto.clarifai.api.Model;
53405
+ reader.readMessage(value, proto.clarifai.api.Model.deserializeBinaryFromReader);
53406
+ msg.setModel(value);
53407
+ break;
53408
+ case 6:
53409
+ var value = new proto.clarifai.api.Workflow;
53410
+ reader.readMessage(value, proto.clarifai.api.Workflow.deserializeBinaryFromReader);
53411
+ msg.setWorkflow(value);
53412
+ break;
53413
+ case 7:
53414
+ var value = /** @type {!proto.clarifai.api.Deployment.SchedulingChoice} */ (reader.readEnum());
53415
+ msg.setSchedulingChoice(value);
53416
+ break;
53417
+ default:
53418
+ reader.skipField();
53419
+ break;
53420
+ }
53421
+ }
53422
+ return msg;
53423
+ };
53424
+ /**
53425
+ * Serializes the message to binary data (in protobuf wire format).
53426
+ * @return {!Uint8Array}
53427
+ */
53428
+ proto.clarifai.api.Deployment.prototype.serializeBinary = function () {
53429
+ var writer = new jspb.BinaryWriter();
53430
+ proto.clarifai.api.Deployment.serializeBinaryToWriter(this, writer);
53431
+ return writer.getResultBuffer();
53432
+ };
53433
+ /**
53434
+ * Serializes the given message to binary data (in protobuf wire
53435
+ * format), writing to the given BinaryWriter.
53436
+ * @param {!proto.clarifai.api.Deployment} message
53437
+ * @param {!jspb.BinaryWriter} writer
53438
+ * @suppress {unusedLocalVariables} f is only used for nested messages
53439
+ */
53440
+ proto.clarifai.api.Deployment.serializeBinaryToWriter = function (message, writer) {
53441
+ var f = undefined;
53442
+ f = message.getId();
53443
+ if (f.length > 0) {
53444
+ writer.writeString(1, f);
53445
+ }
53446
+ f = message.getUserId();
53447
+ if (f.length > 0) {
53448
+ writer.writeString(2, f);
53449
+ }
53450
+ f = message.getAutoscaleConfig();
53451
+ if (f != null) {
53452
+ writer.writeMessage(3, f, proto.clarifai.api.AutoscaleConfig.serializeBinaryToWriter);
53453
+ }
53454
+ f = message.getNodepoolsList();
53455
+ if (f.length > 0) {
53456
+ writer.writeRepeatedMessage(4, f, proto.clarifai.api.Nodepool.serializeBinaryToWriter);
53457
+ }
53458
+ f = message.getModel();
53459
+ if (f != null) {
53460
+ writer.writeMessage(5, f, proto.clarifai.api.Model.serializeBinaryToWriter);
53461
+ }
53462
+ f = message.getWorkflow();
53463
+ if (f != null) {
53464
+ writer.writeMessage(6, f, proto.clarifai.api.Workflow.serializeBinaryToWriter);
53465
+ }
53466
+ f = message.getSchedulingChoice();
53467
+ if (f !== 0.0) {
53468
+ writer.writeEnum(7, f);
53469
+ }
53470
+ };
53471
+ /**
53472
+ * @enum {number}
53473
+ */
53474
+ proto.clarifai.api.Deployment.SchedulingChoice = {
53475
+ UNKNOWN_SCHEDULING_CHOICE: 0,
53476
+ FAIL: 1,
53477
+ RANDOM: 2,
53478
+ PRICE: 3,
53479
+ PERFORMANCE: 4,
53480
+ NETWORK: 5,
53481
+ UTILIZATION: 6,
53482
+ PREFER_SPOT: 7,
53483
+ PREFER_ONDEMAND: 8
53484
+ };
53485
+ /**
53486
+ * optional string id = 1;
53487
+ * @return {string}
53488
+ */
53489
+ proto.clarifai.api.Deployment.prototype.getId = function () {
53490
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
53491
+ };
53492
+ /**
53493
+ * @param {string} value
53494
+ * @return {!proto.clarifai.api.Deployment} returns this
53495
+ */
53496
+ proto.clarifai.api.Deployment.prototype.setId = function (value) {
53497
+ return jspb.Message.setProto3StringField(this, 1, value);
53498
+ };
53499
+ /**
53500
+ * optional string user_id = 2;
53501
+ * @return {string}
53502
+ */
53503
+ proto.clarifai.api.Deployment.prototype.getUserId = function () {
53504
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
53505
+ };
53506
+ /**
53507
+ * @param {string} value
53508
+ * @return {!proto.clarifai.api.Deployment} returns this
53509
+ */
53510
+ proto.clarifai.api.Deployment.prototype.setUserId = function (value) {
53511
+ return jspb.Message.setProto3StringField(this, 2, value);
53512
+ };
53513
+ /**
53514
+ * optional AutoscaleConfig autoscale_config = 3;
53515
+ * @return {?proto.clarifai.api.AutoscaleConfig}
53516
+ */
53517
+ proto.clarifai.api.Deployment.prototype.getAutoscaleConfig = function () {
53518
+ return /** @type{?proto.clarifai.api.AutoscaleConfig} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.AutoscaleConfig, 3));
53519
+ };
53520
+ /**
53521
+ * @param {?proto.clarifai.api.AutoscaleConfig|undefined} value
53522
+ * @return {!proto.clarifai.api.Deployment} returns this
53523
+ */
53524
+ proto.clarifai.api.Deployment.prototype.setAutoscaleConfig = function (value) {
53525
+ return jspb.Message.setWrapperField(this, 3, value);
53526
+ };
53527
+ /**
53528
+ * Clears the message field making it undefined.
53529
+ * @return {!proto.clarifai.api.Deployment} returns this
53530
+ */
53531
+ proto.clarifai.api.Deployment.prototype.clearAutoscaleConfig = function () {
53532
+ return this.setAutoscaleConfig(undefined);
53533
+ };
53534
+ /**
53535
+ * Returns whether this field is set.
53536
+ * @return {boolean}
53537
+ */
53538
+ proto.clarifai.api.Deployment.prototype.hasAutoscaleConfig = function () {
53539
+ return jspb.Message.getField(this, 3) != null;
53540
+ };
53541
+ /**
53542
+ * repeated Nodepool nodepools = 4;
53543
+ * @return {!Array<!proto.clarifai.api.Nodepool>}
53544
+ */
53545
+ proto.clarifai.api.Deployment.prototype.getNodepoolsList = function () {
53546
+ return /** @type{!Array<!proto.clarifai.api.Nodepool>} */ (jspb.Message.getRepeatedWrapperField(this, proto.clarifai.api.Nodepool, 4));
53547
+ };
53548
+ /**
53549
+ * @param {!Array<!proto.clarifai.api.Nodepool>} value
53550
+ * @return {!proto.clarifai.api.Deployment} returns this
53551
+ */
53552
+ proto.clarifai.api.Deployment.prototype.setNodepoolsList = function (value) {
53553
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
53554
+ };
53555
+ /**
53556
+ * @param {!proto.clarifai.api.Nodepool=} opt_value
53557
+ * @param {number=} opt_index
53558
+ * @return {!proto.clarifai.api.Nodepool}
53559
+ */
53560
+ proto.clarifai.api.Deployment.prototype.addNodepools = function (opt_value, opt_index) {
53561
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.clarifai.api.Nodepool, opt_index);
53562
+ };
53563
+ /**
53564
+ * Clears the list making it empty but non-null.
53565
+ * @return {!proto.clarifai.api.Deployment} returns this
53566
+ */
53567
+ proto.clarifai.api.Deployment.prototype.clearNodepoolsList = function () {
53568
+ return this.setNodepoolsList([]);
53569
+ };
53570
+ /**
53571
+ * optional Model model = 5;
53572
+ * @return {?proto.clarifai.api.Model}
53573
+ */
53574
+ proto.clarifai.api.Deployment.prototype.getModel = function () {
53575
+ return /** @type{?proto.clarifai.api.Model} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Model, 5));
53576
+ };
53577
+ /**
53578
+ * @param {?proto.clarifai.api.Model|undefined} value
53579
+ * @return {!proto.clarifai.api.Deployment} returns this
53580
+ */
53581
+ proto.clarifai.api.Deployment.prototype.setModel = function (value) {
53582
+ return jspb.Message.setOneofWrapperField(this, 5, proto.clarifai.api.Deployment.oneofGroups_[0], value);
53583
+ };
53584
+ /**
53585
+ * Clears the message field making it undefined.
53586
+ * @return {!proto.clarifai.api.Deployment} returns this
53587
+ */
53588
+ proto.clarifai.api.Deployment.prototype.clearModel = function () {
53589
+ return this.setModel(undefined);
53590
+ };
53591
+ /**
53592
+ * Returns whether this field is set.
53593
+ * @return {boolean}
53594
+ */
53595
+ proto.clarifai.api.Deployment.prototype.hasModel = function () {
53596
+ return jspb.Message.getField(this, 5) != null;
53597
+ };
53598
+ /**
53599
+ * optional Workflow workflow = 6;
53600
+ * @return {?proto.clarifai.api.Workflow}
53601
+ */
53602
+ proto.clarifai.api.Deployment.prototype.getWorkflow = function () {
53603
+ return /** @type{?proto.clarifai.api.Workflow} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Workflow, 6));
53604
+ };
53605
+ /**
53606
+ * @param {?proto.clarifai.api.Workflow|undefined} value
53607
+ * @return {!proto.clarifai.api.Deployment} returns this
53608
+ */
53609
+ proto.clarifai.api.Deployment.prototype.setWorkflow = function (value) {
53610
+ return jspb.Message.setOneofWrapperField(this, 6, proto.clarifai.api.Deployment.oneofGroups_[0], value);
53611
+ };
53612
+ /**
53613
+ * Clears the message field making it undefined.
53614
+ * @return {!proto.clarifai.api.Deployment} returns this
53615
+ */
53616
+ proto.clarifai.api.Deployment.prototype.clearWorkflow = function () {
53617
+ return this.setWorkflow(undefined);
53618
+ };
53619
+ /**
53620
+ * Returns whether this field is set.
53621
+ * @return {boolean}
53622
+ */
53623
+ proto.clarifai.api.Deployment.prototype.hasWorkflow = function () {
53624
+ return jspb.Message.getField(this, 6) != null;
53625
+ };
53626
+ /**
53627
+ * optional SchedulingChoice scheduling_choice = 7;
53628
+ * @return {!proto.clarifai.api.Deployment.SchedulingChoice}
53629
+ */
53630
+ proto.clarifai.api.Deployment.prototype.getSchedulingChoice = function () {
53631
+ return /** @type {!proto.clarifai.api.Deployment.SchedulingChoice} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
53632
+ };
53633
+ /**
53634
+ * @param {!proto.clarifai.api.Deployment.SchedulingChoice} value
53635
+ * @return {!proto.clarifai.api.Deployment} returns this
53636
+ */
53637
+ proto.clarifai.api.Deployment.prototype.setSchedulingChoice = function (value) {
53638
+ return jspb.Message.setProto3EnumField(this, 7, value);
53639
+ };
53640
+ if (jspb.Message.GENERATE_TO_OBJECT) {
53641
+ /**
53642
+ * Creates an object representation of this proto.
53643
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
53644
+ * Optional fields that are not set will be set to undefined.
53645
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
53646
+ * For the list of reserved names please see:
53647
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
53648
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
53649
+ * JSPB instance for transitional soy proto support:
53650
+ * http://goto/soy-param-migration
53651
+ * @return {!Object}
53652
+ */
53653
+ proto.clarifai.api.RunnerSelector.prototype.toObject = function (opt_includeInstance) {
53654
+ return proto.clarifai.api.RunnerSelector.toObject(opt_includeInstance, this);
53655
+ };
53656
+ /**
53657
+ * Static version of the {@see toObject} method.
53658
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
53659
+ * the JSPB instance for transitional soy proto support:
53660
+ * http://goto/soy-param-migration
53661
+ * @param {!proto.clarifai.api.RunnerSelector} msg The msg instance to transform.
53662
+ * @return {!Object}
53663
+ * @suppress {unusedLocalVariables} f is only used for nested messages
53664
+ */
53665
+ proto.clarifai.api.RunnerSelector.toObject = function (includeInstance, msg) {
53666
+ var f, obj = {
53667
+ nodepool: (f = msg.getNodepool()) && proto.clarifai.api.Nodepool.toObject(includeInstance, f),
53668
+ runner: (f = msg.getRunner()) && proto.clarifai.api.Runner.toObject(includeInstance, f),
53669
+ deployment: (f = msg.getDeployment()) && proto.clarifai.api.Deployment.toObject(includeInstance, f)
53670
+ };
53671
+ if (includeInstance) {
53672
+ obj.$jspbMessageInstance = msg;
53673
+ }
53674
+ return obj;
53675
+ };
53676
+ }
53677
+ /**
53678
+ * Deserializes binary data (in protobuf wire format).
53679
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
53680
+ * @return {!proto.clarifai.api.RunnerSelector}
53681
+ */
53682
+ proto.clarifai.api.RunnerSelector.deserializeBinary = function (bytes) {
53683
+ var reader = new jspb.BinaryReader(bytes);
53684
+ var msg = new proto.clarifai.api.RunnerSelector;
53685
+ return proto.clarifai.api.RunnerSelector.deserializeBinaryFromReader(msg, reader);
53686
+ };
53687
+ /**
53688
+ * Deserializes binary data (in protobuf wire format) from the
53689
+ * given reader into the given message object.
53690
+ * @param {!proto.clarifai.api.RunnerSelector} msg The message object to deserialize into.
53691
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
53692
+ * @return {!proto.clarifai.api.RunnerSelector}
53693
+ */
53694
+ proto.clarifai.api.RunnerSelector.deserializeBinaryFromReader = function (msg, reader) {
53695
+ while (reader.nextField()) {
53696
+ if (reader.isEndGroup()) {
53697
+ break;
53698
+ }
53699
+ var field = reader.getFieldNumber();
53700
+ switch (field) {
53701
+ case 1:
53702
+ var value = new proto.clarifai.api.Nodepool;
53703
+ reader.readMessage(value, proto.clarifai.api.Nodepool.deserializeBinaryFromReader);
53704
+ msg.setNodepool(value);
53705
+ break;
53706
+ case 2:
53707
+ var value = new proto.clarifai.api.Runner;
53708
+ reader.readMessage(value, proto.clarifai.api.Runner.deserializeBinaryFromReader);
53709
+ msg.setRunner(value);
53710
+ break;
53711
+ case 3:
53712
+ var value = new proto.clarifai.api.Deployment;
53713
+ reader.readMessage(value, proto.clarifai.api.Deployment.deserializeBinaryFromReader);
53714
+ msg.setDeployment(value);
53715
+ break;
53716
+ default:
53717
+ reader.skipField();
53718
+ break;
53719
+ }
53720
+ }
53721
+ return msg;
53722
+ };
53723
+ /**
53724
+ * Serializes the message to binary data (in protobuf wire format).
53725
+ * @return {!Uint8Array}
53726
+ */
53727
+ proto.clarifai.api.RunnerSelector.prototype.serializeBinary = function () {
53728
+ var writer = new jspb.BinaryWriter();
53729
+ proto.clarifai.api.RunnerSelector.serializeBinaryToWriter(this, writer);
53730
+ return writer.getResultBuffer();
53731
+ };
53732
+ /**
53733
+ * Serializes the given message to binary data (in protobuf wire
53734
+ * format), writing to the given BinaryWriter.
53735
+ * @param {!proto.clarifai.api.RunnerSelector} message
53736
+ * @param {!jspb.BinaryWriter} writer
53737
+ * @suppress {unusedLocalVariables} f is only used for nested messages
53738
+ */
53739
+ proto.clarifai.api.RunnerSelector.serializeBinaryToWriter = function (message, writer) {
53740
+ var f = undefined;
53741
+ f = message.getNodepool();
53742
+ if (f != null) {
53743
+ writer.writeMessage(1, f, proto.clarifai.api.Nodepool.serializeBinaryToWriter);
53744
+ }
53745
+ f = message.getRunner();
53746
+ if (f != null) {
53747
+ writer.writeMessage(2, f, proto.clarifai.api.Runner.serializeBinaryToWriter);
53748
+ }
53749
+ f = message.getDeployment();
53750
+ if (f != null) {
53751
+ writer.writeMessage(3, f, proto.clarifai.api.Deployment.serializeBinaryToWriter);
53752
+ }
53753
+ };
53754
+ /**
53755
+ * optional Nodepool nodepool = 1;
53756
+ * @return {?proto.clarifai.api.Nodepool}
53757
+ */
53758
+ proto.clarifai.api.RunnerSelector.prototype.getNodepool = function () {
53759
+ return /** @type{?proto.clarifai.api.Nodepool} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Nodepool, 1));
53760
+ };
53761
+ /**
53762
+ * @param {?proto.clarifai.api.Nodepool|undefined} value
53763
+ * @return {!proto.clarifai.api.RunnerSelector} returns this
53764
+ */
53765
+ proto.clarifai.api.RunnerSelector.prototype.setNodepool = function (value) {
53766
+ return jspb.Message.setWrapperField(this, 1, value);
53767
+ };
53768
+ /**
53769
+ * Clears the message field making it undefined.
53770
+ * @return {!proto.clarifai.api.RunnerSelector} returns this
53771
+ */
53772
+ proto.clarifai.api.RunnerSelector.prototype.clearNodepool = function () {
53773
+ return this.setNodepool(undefined);
53774
+ };
53775
+ /**
53776
+ * Returns whether this field is set.
53777
+ * @return {boolean}
53778
+ */
53779
+ proto.clarifai.api.RunnerSelector.prototype.hasNodepool = function () {
53780
+ return jspb.Message.getField(this, 1) != null;
53781
+ };
53782
+ /**
53783
+ * optional Runner runner = 2;
53784
+ * @return {?proto.clarifai.api.Runner}
53785
+ */
53786
+ proto.clarifai.api.RunnerSelector.prototype.getRunner = function () {
53787
+ return /** @type{?proto.clarifai.api.Runner} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Runner, 2));
53788
+ };
53789
+ /**
53790
+ * @param {?proto.clarifai.api.Runner|undefined} value
53791
+ * @return {!proto.clarifai.api.RunnerSelector} returns this
53792
+ */
53793
+ proto.clarifai.api.RunnerSelector.prototype.setRunner = function (value) {
53794
+ return jspb.Message.setWrapperField(this, 2, value);
53795
+ };
53796
+ /**
53797
+ * Clears the message field making it undefined.
53798
+ * @return {!proto.clarifai.api.RunnerSelector} returns this
53799
+ */
53800
+ proto.clarifai.api.RunnerSelector.prototype.clearRunner = function () {
53801
+ return this.setRunner(undefined);
53802
+ };
53803
+ /**
53804
+ * Returns whether this field is set.
53805
+ * @return {boolean}
53806
+ */
53807
+ proto.clarifai.api.RunnerSelector.prototype.hasRunner = function () {
53808
+ return jspb.Message.getField(this, 2) != null;
53809
+ };
53810
+ /**
53811
+ * optional Deployment deployment = 3;
53812
+ * @return {?proto.clarifai.api.Deployment}
53813
+ */
53814
+ proto.clarifai.api.RunnerSelector.prototype.getDeployment = function () {
53815
+ return /** @type{?proto.clarifai.api.Deployment} */ (jspb.Message.getWrapperField(this, proto.clarifai.api.Deployment, 3));
53816
+ };
53817
+ /**
53818
+ * @param {?proto.clarifai.api.Deployment|undefined} value
53819
+ * @return {!proto.clarifai.api.RunnerSelector} returns this
53820
+ */
53821
+ proto.clarifai.api.RunnerSelector.prototype.setDeployment = function (value) {
53822
+ return jspb.Message.setWrapperField(this, 3, value);
53823
+ };
53824
+ /**
53825
+ * Clears the message field making it undefined.
53826
+ * @return {!proto.clarifai.api.RunnerSelector} returns this
53827
+ */
53828
+ proto.clarifai.api.RunnerSelector.prototype.clearDeployment = function () {
53829
+ return this.setDeployment(undefined);
53830
+ };
53831
+ /**
53832
+ * Returns whether this field is set.
53833
+ * @return {boolean}
53834
+ */
53835
+ proto.clarifai.api.RunnerSelector.prototype.hasDeployment = function () {
53836
+ return jspb.Message.getField(this, 3) != null;
53837
+ };
51740
53838
  /**
51741
53839
  * @enum {number}
51742
53840
  */