Skip to content

Commit caa848a

Browse files
box-sdk-buildbox-sdk-build
andauthored
feat: Update legal holds and AI models (box/box-openapi#526) (#460)
Co-authored-by: box-sdk-build <[email protected]>
1 parent 8992b32 commit caa848a

File tree

6 files changed

+52
-4
lines changed

6 files changed

+52
-4
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "20cb559", "specHash": "a8825be", "version": "0.6.1" }
1+
{ "engineHash": "20cb559", "specHash": "2da99e0", "version": "0.6.1" }

Sources/Managers/LegalHoldPolicyAssignments/CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ public enum CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField: Codable
55
case fileVersion
66
case folder
77
case user
8+
case ownership
9+
case interaction
810
case customValue(String)
911

1012
public init(rawValue value: String) {
@@ -17,6 +19,10 @@ public enum CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField: Codable
1719
self = .folder
1820
case "user".lowercased():
1921
self = .user
22+
case "ownership".lowercased():
23+
self = .ownership
24+
case "interaction".lowercased():
25+
self = .interaction
2026
default:
2127
self = .customValue(value)
2228
}
@@ -32,6 +38,10 @@ public enum CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField: Codable
3238
return "folder"
3339
case .user:
3440
return "user"
41+
case .ownership:
42+
return "ownership"
43+
case .interaction:
44+
return "interaction"
3545
case .customValue(let value):
3646
return value
3747
}

Sources/Managers/LegalHoldPolicyAssignments/GetLegalHoldPolicyAssignmentsQueryParamsAssignToTypeField.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ public enum GetLegalHoldPolicyAssignmentsQueryParamsAssignToTypeField: CodableSt
55
case fileVersion
66
case folder
77
case user
8+
case ownership
9+
case interactions
810
case customValue(String)
911

1012
public init(rawValue value: String) {
@@ -17,6 +19,10 @@ public enum GetLegalHoldPolicyAssignmentsQueryParamsAssignToTypeField: CodableSt
1719
self = .folder
1820
case "user".lowercased():
1921
self = .user
22+
case "ownership".lowercased():
23+
self = .ownership
24+
case "interactions".lowercased():
25+
self = .interactions
2026
default:
2127
self = .customValue(value)
2228
}
@@ -32,6 +38,10 @@ public enum GetLegalHoldPolicyAssignmentsQueryParamsAssignToTypeField: CodableSt
3238
return "folder"
3339
case .user:
3440
return "user"
41+
case .ownership:
42+
return "ownership"
43+
case .interactions:
44+
return "interactions"
3545
case .customValue(let value):
3646
return value
3747
}

Sources/Schemas/AiAgentAsk/AiAgentAsk.swift

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ public class AiAgentAsk: Codable, RawJSONReadable {
88
case basicText = "basic_text"
99
case longTextMulti = "long_text_multi"
1010
case basicTextMulti = "basic_text_multi"
11+
case basicImage = "basic_image"
12+
case basicImageMulti = "basic_image_multi"
1113
}
1214

1315
/// Internal backing store for rawData. Used to store raw dictionary data associated with the instance.
@@ -30,6 +32,10 @@ public class AiAgentAsk: Codable, RawJSONReadable {
3032

3133
public let basicTextMulti: AiAgentBasicTextTool?
3234

35+
public let basicImage: AiAgentBasicTextTool?
36+
37+
public let basicImageMulti: AiAgentBasicTextTool?
38+
3339
/// Initializer for a AiAgentAsk.
3440
///
3541
/// - Parameters:
@@ -38,12 +44,16 @@ public class AiAgentAsk: Codable, RawJSONReadable {
3844
/// - basicText:
3945
/// - longTextMulti:
4046
/// - basicTextMulti:
41-
public init(type: AiAgentAskTypeField = AiAgentAskTypeField.aiAgentAsk, longText: AiAgentLongTextTool? = nil, basicText: AiAgentBasicTextTool? = nil, longTextMulti: AiAgentLongTextTool? = nil, basicTextMulti: AiAgentBasicTextTool? = nil) {
47+
/// - basicImage:
48+
/// - basicImageMulti:
49+
public init(type: AiAgentAskTypeField = AiAgentAskTypeField.aiAgentAsk, longText: AiAgentLongTextTool? = nil, basicText: AiAgentBasicTextTool? = nil, longTextMulti: AiAgentLongTextTool? = nil, basicTextMulti: AiAgentBasicTextTool? = nil, basicImage: AiAgentBasicTextTool? = nil, basicImageMulti: AiAgentBasicTextTool? = nil) {
4250
self.type = type
4351
self.longText = longText
4452
self.basicText = basicText
4553
self.longTextMulti = longTextMulti
4654
self.basicTextMulti = basicTextMulti
55+
self.basicImage = basicImage
56+
self.basicImageMulti = basicImageMulti
4757
}
4858

4959
required public init(from decoder: Decoder) throws {
@@ -53,6 +63,8 @@ public class AiAgentAsk: Codable, RawJSONReadable {
5363
basicText = try container.decodeIfPresent(AiAgentBasicTextTool.self, forKey: .basicText)
5464
longTextMulti = try container.decodeIfPresent(AiAgentLongTextTool.self, forKey: .longTextMulti)
5565
basicTextMulti = try container.decodeIfPresent(AiAgentBasicTextTool.self, forKey: .basicTextMulti)
66+
basicImage = try container.decodeIfPresent(AiAgentBasicTextTool.self, forKey: .basicImage)
67+
basicImageMulti = try container.decodeIfPresent(AiAgentBasicTextTool.self, forKey: .basicImageMulti)
5668
}
5769

5870
public func encode(to encoder: Encoder) throws {
@@ -62,6 +74,8 @@ public class AiAgentAsk: Codable, RawJSONReadable {
6274
try container.encodeIfPresent(basicText, forKey: .basicText)
6375
try container.encodeIfPresent(longTextMulti, forKey: .longTextMulti)
6476
try container.encodeIfPresent(basicTextMulti, forKey: .basicTextMulti)
77+
try container.encodeIfPresent(basicImage, forKey: .basicImage)
78+
try container.encodeIfPresent(basicImageMulti, forKey: .basicImageMulti)
6579
}
6680

6781
/// Sets the raw JSON data.

Sources/Schemas/AiAgentExtract/AiAgentExtract.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public class AiAgentExtract: Codable, RawJSONReadable {
66
case type
77
case longText = "long_text"
88
case basicText = "basic_text"
9+
case basicImage = "basic_image"
910
}
1011

1112
/// Internal backing store for rawData. Used to store raw dictionary data associated with the instance.
@@ -24,30 +25,36 @@ public class AiAgentExtract: Codable, RawJSONReadable {
2425

2526
public let basicText: AiAgentBasicTextTool?
2627

28+
public let basicImage: AiAgentBasicTextTool?
29+
2730
/// Initializer for a AiAgentExtract.
2831
///
2932
/// - Parameters:
3033
/// - type: The type of AI agent to be used for extraction.
3134
/// - longText:
3235
/// - basicText:
33-
public init(type: AiAgentExtractTypeField = AiAgentExtractTypeField.aiAgentExtract, longText: AiAgentLongTextTool? = nil, basicText: AiAgentBasicTextTool? = nil) {
36+
/// - basicImage:
37+
public init(type: AiAgentExtractTypeField = AiAgentExtractTypeField.aiAgentExtract, longText: AiAgentLongTextTool? = nil, basicText: AiAgentBasicTextTool? = nil, basicImage: AiAgentBasicTextTool? = nil) {
3438
self.type = type
3539
self.longText = longText
3640
self.basicText = basicText
41+
self.basicImage = basicImage
3742
}
3843

3944
required public init(from decoder: Decoder) throws {
4045
let container = try decoder.container(keyedBy: CodingKeys.self)
4146
type = try container.decode(AiAgentExtractTypeField.self, forKey: .type)
4247
longText = try container.decodeIfPresent(AiAgentLongTextTool.self, forKey: .longText)
4348
basicText = try container.decodeIfPresent(AiAgentBasicTextTool.self, forKey: .basicText)
49+
basicImage = try container.decodeIfPresent(AiAgentBasicTextTool.self, forKey: .basicImage)
4450
}
4551

4652
public func encode(to encoder: Encoder) throws {
4753
var container = encoder.container(keyedBy: CodingKeys.self)
4854
try container.encode(type, forKey: .type)
4955
try container.encodeIfPresent(longText, forKey: .longText)
5056
try container.encodeIfPresent(basicText, forKey: .basicText)
57+
try container.encodeIfPresent(basicImage, forKey: .basicImage)
5158
}
5259

5360
/// Sets the raw JSON data.

Sources/Schemas/AiAgentExtractStructured/AiAgentExtractStructured.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public class AiAgentExtractStructured: Codable, RawJSONReadable {
66
case type
77
case longText = "long_text"
88
case basicText = "basic_text"
9+
case basicImage = "basic_image"
910
}
1011

1112
/// Internal backing store for rawData. Used to store raw dictionary data associated with the instance.
@@ -24,30 +25,36 @@ public class AiAgentExtractStructured: Codable, RawJSONReadable {
2425

2526
public let basicText: AiAgentBasicTextTool?
2627

28+
public let basicImage: AiAgentBasicTextTool?
29+
2730
/// Initializer for a AiAgentExtractStructured.
2831
///
2932
/// - Parameters:
3033
/// - type: The type of AI agent to be used for extraction.
3134
/// - longText:
3235
/// - basicText:
33-
public init(type: AiAgentExtractStructuredTypeField = AiAgentExtractStructuredTypeField.aiAgentExtractStructured, longText: AiAgentLongTextTool? = nil, basicText: AiAgentBasicTextTool? = nil) {
36+
/// - basicImage:
37+
public init(type: AiAgentExtractStructuredTypeField = AiAgentExtractStructuredTypeField.aiAgentExtractStructured, longText: AiAgentLongTextTool? = nil, basicText: AiAgentBasicTextTool? = nil, basicImage: AiAgentBasicTextTool? = nil) {
3438
self.type = type
3539
self.longText = longText
3640
self.basicText = basicText
41+
self.basicImage = basicImage
3742
}
3843

3944
required public init(from decoder: Decoder) throws {
4045
let container = try decoder.container(keyedBy: CodingKeys.self)
4146
type = try container.decode(AiAgentExtractStructuredTypeField.self, forKey: .type)
4247
longText = try container.decodeIfPresent(AiAgentLongTextTool.self, forKey: .longText)
4348
basicText = try container.decodeIfPresent(AiAgentBasicTextTool.self, forKey: .basicText)
49+
basicImage = try container.decodeIfPresent(AiAgentBasicTextTool.self, forKey: .basicImage)
4450
}
4551

4652
public func encode(to encoder: Encoder) throws {
4753
var container = encoder.container(keyedBy: CodingKeys.self)
4854
try container.encode(type, forKey: .type)
4955
try container.encodeIfPresent(longText, forKey: .longText)
5056
try container.encodeIfPresent(basicText, forKey: .basicText)
57+
try container.encodeIfPresent(basicImage, forKey: .basicImage)
5158
}
5259

5360
/// Sets the raw JSON data.

0 commit comments

Comments
 (0)