Skip to content

Commit 2898bb4

Browse files
committed
GRPC clients version 9.8.1
1 parent 288cbc0 commit 2898bb4

File tree

3 files changed

+114
-21
lines changed

3 files changed

+114
-21
lines changed

Sources/ClarifaiGrpc/proto/clarifai/api/resources.pb.swift

Lines changed: 95 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4154,19 +4154,29 @@ public struct Clarifai_Api_TrainInfo {
41544154
/// defined for each ModelType as a Struct (JSON object) here. During training, the settings
41554155
/// contained within are sent to the training processor to alter the training process.
41564156
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}
41594159
}
41604160
/// 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}
41624162
/// 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}
41644174

41654175
public var unknownFields = SwiftProtobuf.UnknownStorage()
41664176

41674177
public init() {}
41684178

4169-
fileprivate var _params: SwiftProtobuf.Google_Protobuf_Struct? = nil
4179+
fileprivate var _storage = _StorageClass.defaultInstance
41704180
}
41714181

41724182
public struct Clarifai_Api_EvalInfo {
@@ -4527,6 +4537,12 @@ public struct Clarifai_Api_ModelTypeField {
45274537

45284538
/// For auto-completing to concepts in the model.
45294539
case arrayOfModelConcepts // = 18
4540+
4541+
/// For selecting a dataset
4542+
case dataset // = 19
4543+
4544+
/// For selecting a dataset version
4545+
case datasetVersion // = 20
45304546
case UNRECOGNIZED(Int)
45314547

45324548
public init() {
@@ -4553,6 +4569,8 @@ public struct Clarifai_Api_ModelTypeField {
45534569
case 16: self = .datasetID
45544570
case 17: self = .datasetVersionID
45554571
case 18: self = .arrayOfModelConcepts
4572+
case 19: self = .dataset
4573+
case 20: self = .datasetVersion
45564574
default: self = .UNRECOGNIZED(rawValue)
45574575
}
45584576
}
@@ -4577,6 +4595,8 @@ public struct Clarifai_Api_ModelTypeField {
45774595
case .datasetID: return 16
45784596
case .datasetVersionID: return 17
45794597
case .arrayOfModelConcepts: return 18
4598+
case .dataset: return 19
4599+
case .datasetVersion: return 20
45804600
case .UNRECOGNIZED(let i): return i
45814601
}
45824602
}
@@ -4612,6 +4632,8 @@ extension Clarifai_Api_ModelTypeField.ModelTypeFieldType: CaseIterable {
46124632
.datasetID,
46134633
.datasetVersionID,
46144634
.arrayOfModelConcepts,
4635+
.dataset,
4636+
.datasetVersion,
46154637
]
46164638
}
46174639

@@ -4873,6 +4895,7 @@ public struct Clarifai_Api_ModelVersion {
48734895
/// Clears the value of `importInfo`. Subsequent reads from it will return its default value.
48744896
public mutating func clearImportInfo() {_uniqueStorage()._importInfo = nil}
48754897

4898+
/// Contains the training logs if available
48764899
public var trainLog: String {
48774900
get {return _storage._trainLog}
48784901
set {_uniqueStorage()._trainLog = newValue}
@@ -8294,6 +8317,10 @@ public struct Clarifai_Api_APIPostModelOutputsCollectorSource {
82948317
/// Collector is defined in.
82958318
public var postInputsKeyID: String = String()
82968319

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+
82978324
public var unknownFields = SwiftProtobuf.UnknownStorage()
82988325

82998326
public init() {}
@@ -15228,33 +15255,73 @@ extension Clarifai_Api_TrainInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageI
1522815255
public static let protoMessageName: String = _protobuf_package + ".TrainInfo"
1522915256
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1523015257
1: .same(proto: "params"),
15258+
2: .same(proto: "dataset"),
1523115259
]
1523215260

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+
1523315282
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+
}
1524115294
}
1524215295
}
1524315296
}
1524415297

1524515298
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+
}
1525315311
try unknownFields.traverse(visitor: &visitor)
1525415312
}
1525515313

1525615314
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+
}
1525815325
if lhs.unknownFields != rhs.unknownFields {return false}
1525915326
return true
1526015327
}
@@ -15786,6 +15853,8 @@ extension Clarifai_Api_ModelTypeField.ModelTypeFieldType: SwiftProtobuf._ProtoNa
1578615853
16: .same(proto: "DATASET_ID"),
1578715854
17: .same(proto: "DATASET_VERSION_ID"),
1578815855
18: .same(proto: "ARRAY_OF_MODEL_CONCEPTS"),
15856+
19: .same(proto: "DATASET"),
15857+
20: .same(proto: "DATASET_VERSION"),
1578915858
]
1579015859
}
1579115860

@@ -20850,6 +20919,7 @@ extension Clarifai_Api_APIPostModelOutputsCollectorSource: SwiftProtobuf.Message
2085020919
3: .standard(proto: "model_id"),
2085120920
4: .standard(proto: "model_version_id"),
2085220921
5: .standard(proto: "post_inputs_key_id"),
20922+
6: .standard(proto: "caller_user_id"),
2085320923
]
2085420924

2085520925
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -20863,6 +20933,7 @@ extension Clarifai_Api_APIPostModelOutputsCollectorSource: SwiftProtobuf.Message
2086320933
case 3: try { try decoder.decodeSingularStringField(value: &self.modelID) }()
2086420934
case 4: try { try decoder.decodeSingularStringField(value: &self.modelVersionID) }()
2086520935
case 5: try { try decoder.decodeSingularStringField(value: &self.postInputsKeyID) }()
20936+
case 6: try { try decoder.decodeSingularStringField(value: &self.callerUserID) }()
2086620937
default: break
2086720938
}
2086820939
}
@@ -20884,6 +20955,9 @@ extension Clarifai_Api_APIPostModelOutputsCollectorSource: SwiftProtobuf.Message
2088420955
if !self.postInputsKeyID.isEmpty {
2088520956
try visitor.visitSingularStringField(value: self.postInputsKeyID, fieldNumber: 5)
2088620957
}
20958+
if !self.callerUserID.isEmpty {
20959+
try visitor.visitSingularStringField(value: self.callerUserID, fieldNumber: 6)
20960+
}
2088720961
try unknownFields.traverse(visitor: &visitor)
2088820962
}
2088920963

@@ -20893,6 +20967,7 @@ extension Clarifai_Api_APIPostModelOutputsCollectorSource: SwiftProtobuf.Message
2089320967
if lhs.modelID != rhs.modelID {return false}
2089420968
if lhs.modelVersionID != rhs.modelVersionID {return false}
2089520969
if lhs.postInputsKeyID != rhs.postInputsKeyID {return false}
20970+
if lhs.callerUserID != rhs.callerUserID {return false}
2089620971
if lhs.unknownFields != rhs.unknownFields {return false}
2089720972
return true
2089820973
}

Sources/ClarifaiGrpc/proto/clarifai/api/service.pb.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,9 @@ public struct Clarifai_Api_ListConceptsRequest {
11531153
/// to 128.
11541154
public var perPage: UInt32 = 0
11551155

1156+
/// Fuzzy match on concept ID
1157+
public var id: String = String()
1158+
11561159
public var unknownFields = SwiftProtobuf.UnknownStorage()
11571160

11581161
public init() {}
@@ -2413,6 +2416,9 @@ public struct Clarifai_Api_ListDatasetsRequest {
24132416
/// Filter datasets by bookmark. If set, only return bookmarked datasets. Otherwise none bookmarked datasets only.
24142417
public var bookmark: Bool = false
24152418

2419+
/// Fuzzy filter on dataset ID
2420+
public var id: String = String()
2421+
24162422
public var unknownFields = SwiftProtobuf.UnknownStorage()
24172423

24182424
public enum OneOf_SortBy: Equatable {
@@ -11766,6 +11772,7 @@ extension Clarifai_Api_ListConceptsRequest: SwiftProtobuf.Message, SwiftProtobuf
1176611772
1: .standard(proto: "user_app_id"),
1176711773
2: .same(proto: "page"),
1176811774
3: .standard(proto: "per_page"),
11775+
4: .same(proto: "id"),
1176911776
]
1177011777

1177111778
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -11777,6 +11784,7 @@ extension Clarifai_Api_ListConceptsRequest: SwiftProtobuf.Message, SwiftProtobuf
1177711784
case 1: try { try decoder.decodeSingularMessageField(value: &self._userAppID) }()
1177811785
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.page) }()
1177911786
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.perPage) }()
11787+
case 4: try { try decoder.decodeSingularStringField(value: &self.id) }()
1178011788
default: break
1178111789
}
1178211790
}
@@ -11796,13 +11804,17 @@ extension Clarifai_Api_ListConceptsRequest: SwiftProtobuf.Message, SwiftProtobuf
1179611804
if self.perPage != 0 {
1179711805
try visitor.visitSingularUInt32Field(value: self.perPage, fieldNumber: 3)
1179811806
}
11807+
if !self.id.isEmpty {
11808+
try visitor.visitSingularStringField(value: self.id, fieldNumber: 4)
11809+
}
1179911810
try unknownFields.traverse(visitor: &visitor)
1180011811
}
1180111812

1180211813
public static func ==(lhs: Clarifai_Api_ListConceptsRequest, rhs: Clarifai_Api_ListConceptsRequest) -> Bool {
1180311814
if lhs._userAppID != rhs._userAppID {return false}
1180411815
if lhs.page != rhs.page {return false}
1180511816
if lhs.perPage != rhs.perPage {return false}
11817+
if lhs.id != rhs.id {return false}
1180611818
if lhs.unknownFields != rhs.unknownFields {return false}
1180711819
return true
1180811820
}
@@ -13730,6 +13742,7 @@ extension Clarifai_Api_ListDatasetsRequest: SwiftProtobuf.Message, SwiftProtobuf
1373013742
9: .standard(proto: "sort_by_modified_at"),
1373113743
11: .standard(proto: "sort_by_id"),
1373213744
10: .same(proto: "bookmark"),
13745+
12: .same(proto: "id"),
1373313746
]
1373413747

1373513748
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -13777,6 +13790,7 @@ extension Clarifai_Api_ListDatasetsRequest: SwiftProtobuf.Message, SwiftProtobuf
1377713790
self.sortBy = .sortByID(v)
1377813791
}
1377913792
}()
13793+
case 12: try { try decoder.decodeSingularStringField(value: &self.id) }()
1378013794
default: break
1378113795
}
1378213796
}
@@ -13826,6 +13840,9 @@ extension Clarifai_Api_ListDatasetsRequest: SwiftProtobuf.Message, SwiftProtobuf
1382613840
try { if case .sortByID(let v)? = self.sortBy {
1382713841
try visitor.visitSingularBoolField(value: v, fieldNumber: 11)
1382813842
} }()
13843+
if !self.id.isEmpty {
13844+
try visitor.visitSingularStringField(value: self.id, fieldNumber: 12)
13845+
}
1382913846
try unknownFields.traverse(visitor: &visitor)
1383013847
}
1383113848

@@ -13838,6 +13855,7 @@ extension Clarifai_Api_ListDatasetsRequest: SwiftProtobuf.Message, SwiftProtobuf
1383813855
if lhs.sortAscending != rhs.sortAscending {return false}
1383913856
if lhs.sortBy != rhs.sortBy {return false}
1384013857
if lhs.bookmark != rhs.bookmark {return false}
13858+
if lhs.id != rhs.id {return false}
1384113859
if lhs.unknownFields != rhs.unknownFields {return false}
1384213860
return true
1384313861
}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9.8.0
1+
9.8.1

0 commit comments

Comments
 (0)