@@ -4154,19 +4154,29 @@ public struct Clarifai_Api_TrainInfo {
4154
4154
/// defined for each ModelType as a Struct (JSON object) here. During training, the settings
4155
4155
/// contained within are sent to the training processor to alter the training process.
4156
4156
public var params: SwiftProtobuf.Google_Protobuf_Struct {
4157
- get {return _params ?? SwiftProtobuf.Google_Protobuf_Struct()}
4158
- set {_params = newValue}
4157
+ get {return _storage. _params ?? SwiftProtobuf.Google_Protobuf_Struct()}
4158
+ set {_uniqueStorage(). _params = newValue}
4159
4159
}
4160
4160
/// Returns true if `params` has been explicitly set.
4161
- public var hasParams: Bool {return self ._params != nil}
4161
+ public var hasParams: Bool {return _storage ._params != nil}
4162
4162
/// Clears the value of `params`. Subsequent reads from it will return its default value.
4163
- public mutating func clearParams() {self._params = nil}
4163
+ public mutating func clearParams() {_uniqueStorage()._params = nil}
4164
+
4165
+ /// The dataset and dataset version this model version was or will be trained on
4166
+ public var dataset: Clarifai_Api_Dataset {
4167
+ get {return _storage._dataset ?? Clarifai_Api_Dataset()}
4168
+ set {_uniqueStorage()._dataset = newValue}
4169
+ }
4170
+ /// Returns true if `dataset` has been explicitly set.
4171
+ public var hasDataset: Bool {return _storage._dataset != nil}
4172
+ /// Clears the value of `dataset`. Subsequent reads from it will return its default value.
4173
+ public mutating func clearDataset() {_uniqueStorage()._dataset = nil}
4164
4174
4165
4175
public var unknownFields = SwiftProtobuf.UnknownStorage()
4166
4176
4167
4177
public init() {}
4168
4178
4169
- fileprivate var _params: SwiftProtobuf.Google_Protobuf_Struct? = nil
4179
+ fileprivate var _storage = _StorageClass.defaultInstance
4170
4180
}
4171
4181
4172
4182
public struct Clarifai_Api_EvalInfo {
@@ -4527,6 +4537,12 @@ public struct Clarifai_Api_ModelTypeField {
4527
4537
4528
4538
/// For auto-completing to concepts in the model.
4529
4539
case arrayOfModelConcepts // = 18
4540
+
4541
+ /// For selecting a dataset
4542
+ case dataset // = 19
4543
+
4544
+ /// For selecting a dataset version
4545
+ case datasetVersion // = 20
4530
4546
case UNRECOGNIZED(Int)
4531
4547
4532
4548
public init() {
@@ -4553,6 +4569,8 @@ public struct Clarifai_Api_ModelTypeField {
4553
4569
case 16: self = .datasetID
4554
4570
case 17: self = .datasetVersionID
4555
4571
case 18: self = .arrayOfModelConcepts
4572
+ case 19: self = .dataset
4573
+ case 20: self = .datasetVersion
4556
4574
default: self = .UNRECOGNIZED(rawValue)
4557
4575
}
4558
4576
}
@@ -4577,6 +4595,8 @@ public struct Clarifai_Api_ModelTypeField {
4577
4595
case .datasetID: return 16
4578
4596
case .datasetVersionID: return 17
4579
4597
case .arrayOfModelConcepts: return 18
4598
+ case .dataset: return 19
4599
+ case .datasetVersion: return 20
4580
4600
case .UNRECOGNIZED(let i): return i
4581
4601
}
4582
4602
}
@@ -4612,6 +4632,8 @@ extension Clarifai_Api_ModelTypeField.ModelTypeFieldType: CaseIterable {
4612
4632
.datasetID,
4613
4633
.datasetVersionID,
4614
4634
.arrayOfModelConcepts,
4635
+ .dataset,
4636
+ .datasetVersion,
4615
4637
]
4616
4638
}
4617
4639
@@ -4873,6 +4895,7 @@ public struct Clarifai_Api_ModelVersion {
4873
4895
/// Clears the value of `importInfo`. Subsequent reads from it will return its default value.
4874
4896
public mutating func clearImportInfo() {_uniqueStorage()._importInfo = nil}
4875
4897
4898
+ /// Contains the training logs if available
4876
4899
public var trainLog: String {
4877
4900
get {return _storage._trainLog}
4878
4901
set {_uniqueStorage()._trainLog = newValue}
@@ -8294,6 +8317,10 @@ public struct Clarifai_Api_APIPostModelOutputsCollectorSource {
8294
8317
/// Collector is defined in.
8295
8318
public var postInputsKeyID: String = String()
8296
8319
8320
+ /// This is a private field that defaults to the app owner for public users.
8321
+ /// If this is left blank then this collector will collect from ALL users calling the given model.
8322
+ public var callerUserID: String = String()
8323
+
8297
8324
public var unknownFields = SwiftProtobuf.UnknownStorage()
8298
8325
8299
8326
public init() {}
@@ -15228,33 +15255,73 @@ extension Clarifai_Api_TrainInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageI
15228
15255
public static let protoMessageName: String = _protobuf_package + ".TrainInfo"
15229
15256
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
15230
15257
1: .same(proto: "params"),
15258
+ 2: .same(proto: "dataset"),
15231
15259
]
15232
15260
15261
+ fileprivate class _StorageClass {
15262
+ var _params: SwiftProtobuf.Google_Protobuf_Struct? = nil
15263
+ var _dataset: Clarifai_Api_Dataset? = nil
15264
+
15265
+ static let defaultInstance = _StorageClass()
15266
+
15267
+ private init() {}
15268
+
15269
+ init(copying source: _StorageClass) {
15270
+ _params = source._params
15271
+ _dataset = source._dataset
15272
+ }
15273
+ }
15274
+
15275
+ fileprivate mutating func _uniqueStorage() -> _StorageClass {
15276
+ if !isKnownUniquelyReferenced(&_storage) {
15277
+ _storage = _StorageClass(copying: _storage)
15278
+ }
15279
+ return _storage
15280
+ }
15281
+
15233
15282
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
15234
- while let fieldNumber = try decoder.nextFieldNumber() {
15235
- // The use of inline closures is to circumvent an issue where the compiler
15236
- // allocates stack space for every case branch when no optimizations are
15237
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
15238
- switch fieldNumber {
15239
- case 1: try { try decoder.decodeSingularMessageField(value: &self._params) }()
15240
- default: break
15283
+ _ = _uniqueStorage()
15284
+ try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
15285
+ while let fieldNumber = try decoder.nextFieldNumber() {
15286
+ // The use of inline closures is to circumvent an issue where the compiler
15287
+ // allocates stack space for every case branch when no optimizations are
15288
+ // enabled. https://github.com/apple/swift-protobuf/issues/1034
15289
+ switch fieldNumber {
15290
+ case 1: try { try decoder.decodeSingularMessageField(value: &_storage._params) }()
15291
+ case 2: try { try decoder.decodeSingularMessageField(value: &_storage._dataset) }()
15292
+ default: break
15293
+ }
15241
15294
}
15242
15295
}
15243
15296
}
15244
15297
15245
15298
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
15246
- // The use of inline closures is to circumvent an issue where the compiler
15247
- // allocates stack space for every if/case branch local when no optimizations
15248
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
15249
- // https://github.com/apple/swift-protobuf/issues/1182
15250
- try { if let v = self._params {
15251
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
15252
- } }()
15299
+ try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
15300
+ // The use of inline closures is to circumvent an issue where the compiler
15301
+ // allocates stack space for every if/case branch local when no optimizations
15302
+ // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
15303
+ // https://github.com/apple/swift-protobuf/issues/1182
15304
+ try { if let v = _storage._params {
15305
+ try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
15306
+ } }()
15307
+ try { if let v = _storage._dataset {
15308
+ try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
15309
+ } }()
15310
+ }
15253
15311
try unknownFields.traverse(visitor: &visitor)
15254
15312
}
15255
15313
15256
15314
public static func ==(lhs: Clarifai_Api_TrainInfo, rhs: Clarifai_Api_TrainInfo) -> Bool {
15257
- if lhs._params != rhs._params {return false}
15315
+ if lhs._storage !== rhs._storage {
15316
+ let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
15317
+ let _storage = _args.0
15318
+ let rhs_storage = _args.1
15319
+ if _storage._params != rhs_storage._params {return false}
15320
+ if _storage._dataset != rhs_storage._dataset {return false}
15321
+ return true
15322
+ }
15323
+ if !storagesAreEqual {return false}
15324
+ }
15258
15325
if lhs.unknownFields != rhs.unknownFields {return false}
15259
15326
return true
15260
15327
}
@@ -15786,6 +15853,8 @@ extension Clarifai_Api_ModelTypeField.ModelTypeFieldType: SwiftProtobuf._ProtoNa
15786
15853
16: .same(proto: "DATASET_ID"),
15787
15854
17: .same(proto: "DATASET_VERSION_ID"),
15788
15855
18: .same(proto: "ARRAY_OF_MODEL_CONCEPTS"),
15856
+ 19: .same(proto: "DATASET"),
15857
+ 20: .same(proto: "DATASET_VERSION"),
15789
15858
]
15790
15859
}
15791
15860
@@ -20850,6 +20919,7 @@ extension Clarifai_Api_APIPostModelOutputsCollectorSource: SwiftProtobuf.Message
20850
20919
3: .standard(proto: "model_id"),
20851
20920
4: .standard(proto: "model_version_id"),
20852
20921
5: .standard(proto: "post_inputs_key_id"),
20922
+ 6: .standard(proto: "caller_user_id"),
20853
20923
]
20854
20924
20855
20925
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -20863,6 +20933,7 @@ extension Clarifai_Api_APIPostModelOutputsCollectorSource: SwiftProtobuf.Message
20863
20933
case 3: try { try decoder.decodeSingularStringField(value: &self.modelID) }()
20864
20934
case 4: try { try decoder.decodeSingularStringField(value: &self.modelVersionID) }()
20865
20935
case 5: try { try decoder.decodeSingularStringField(value: &self.postInputsKeyID) }()
20936
+ case 6: try { try decoder.decodeSingularStringField(value: &self.callerUserID) }()
20866
20937
default: break
20867
20938
}
20868
20939
}
@@ -20884,6 +20955,9 @@ extension Clarifai_Api_APIPostModelOutputsCollectorSource: SwiftProtobuf.Message
20884
20955
if !self.postInputsKeyID.isEmpty {
20885
20956
try visitor.visitSingularStringField(value: self.postInputsKeyID, fieldNumber: 5)
20886
20957
}
20958
+ if !self.callerUserID.isEmpty {
20959
+ try visitor.visitSingularStringField(value: self.callerUserID, fieldNumber: 6)
20960
+ }
20887
20961
try unknownFields.traverse(visitor: &visitor)
20888
20962
}
20889
20963
@@ -20893,6 +20967,7 @@ extension Clarifai_Api_APIPostModelOutputsCollectorSource: SwiftProtobuf.Message
20893
20967
if lhs.modelID != rhs.modelID {return false}
20894
20968
if lhs.modelVersionID != rhs.modelVersionID {return false}
20895
20969
if lhs.postInputsKeyID != rhs.postInputsKeyID {return false}
20970
+ if lhs.callerUserID != rhs.callerUserID {return false}
20896
20971
if lhs.unknownFields != rhs.unknownFields {return false}
20897
20972
return true
20898
20973
}
0 commit comments