Skip to content

Commit 9e34b8e

Browse files
Commit via running: make Sources/activity
1 parent afdd253 commit 9e34b8e

File tree

1 file changed

+165
-1
lines changed

1 file changed

+165
-1
lines changed

Sources/activity/Types.swift

Lines changed: 165 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2907,6 +2907,164 @@ public enum Components {
29072907
case totalBlocking = "total_blocking"
29082908
}
29092909
}
2910+
/// A value assigned to an issue field
2911+
///
2912+
/// - Remark: Generated from `#/components/schemas/issue-field-value`.
2913+
public struct IssueFieldValue: Codable, Hashable, Sendable {
2914+
/// Unique identifier for the issue field.
2915+
///
2916+
/// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_id`.
2917+
public var issueFieldId: Swift.Int64
2918+
/// - Remark: Generated from `#/components/schemas/issue-field-value/node_id`.
2919+
public var nodeId: Swift.String
2920+
/// The data type of the issue field
2921+
///
2922+
/// - Remark: Generated from `#/components/schemas/issue-field-value/data_type`.
2923+
@frozen public enum DataTypePayload: String, Codable, Hashable, Sendable, CaseIterable {
2924+
case text = "text"
2925+
case singleSelect = "single_select"
2926+
case number = "number"
2927+
case date = "date"
2928+
}
2929+
/// The data type of the issue field
2930+
///
2931+
/// - Remark: Generated from `#/components/schemas/issue-field-value/data_type`.
2932+
public var dataType: Components.Schemas.IssueFieldValue.DataTypePayload
2933+
/// The value of the issue field
2934+
///
2935+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value`.
2936+
public struct ValuePayload: Codable, Hashable, Sendable {
2937+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value/value1`.
2938+
public var value1: Swift.String?
2939+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value/value2`.
2940+
public var value2: Swift.Double?
2941+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value/value3`.
2942+
public var value3: Swift.Int?
2943+
/// Creates a new `ValuePayload`.
2944+
///
2945+
/// - Parameters:
2946+
/// - value1:
2947+
/// - value2:
2948+
/// - value3:
2949+
public init(
2950+
value1: Swift.String? = nil,
2951+
value2: Swift.Double? = nil,
2952+
value3: Swift.Int? = nil
2953+
) {
2954+
self.value1 = value1
2955+
self.value2 = value2
2956+
self.value3 = value3
2957+
}
2958+
public init(from decoder: any Decoder) throws {
2959+
var errors: [any Error] = []
2960+
do {
2961+
self.value1 = try decoder.decodeFromSingleValueContainer()
2962+
} catch {
2963+
errors.append(error)
2964+
}
2965+
do {
2966+
self.value2 = try decoder.decodeFromSingleValueContainer()
2967+
} catch {
2968+
errors.append(error)
2969+
}
2970+
do {
2971+
self.value3 = try decoder.decodeFromSingleValueContainer()
2972+
} catch {
2973+
errors.append(error)
2974+
}
2975+
try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil(
2976+
[
2977+
self.value1,
2978+
self.value2,
2979+
self.value3
2980+
],
2981+
type: Self.self,
2982+
codingPath: decoder.codingPath,
2983+
errors: errors
2984+
)
2985+
}
2986+
public func encode(to encoder: any Encoder) throws {
2987+
try encoder.encodeFirstNonNilValueToSingleValueContainer([
2988+
self.value1,
2989+
self.value2,
2990+
self.value3
2991+
])
2992+
}
2993+
}
2994+
/// The value of the issue field
2995+
///
2996+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value`.
2997+
public var value: Components.Schemas.IssueFieldValue.ValuePayload?
2998+
/// Details about the selected option (only present for single_select fields)
2999+
///
3000+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option`.
3001+
public struct SingleSelectOptionPayload: Codable, Hashable, Sendable {
3002+
/// Unique identifier for the option.
3003+
///
3004+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/id`.
3005+
public var id: Swift.Int64
3006+
/// The name of the option
3007+
///
3008+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/name`.
3009+
public var name: Swift.String
3010+
/// The color of the option
3011+
///
3012+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/color`.
3013+
public var color: Swift.String
3014+
/// Creates a new `SingleSelectOptionPayload`.
3015+
///
3016+
/// - Parameters:
3017+
/// - id: Unique identifier for the option.
3018+
/// - name: The name of the option
3019+
/// - color: The color of the option
3020+
public init(
3021+
id: Swift.Int64,
3022+
name: Swift.String,
3023+
color: Swift.String
3024+
) {
3025+
self.id = id
3026+
self.name = name
3027+
self.color = color
3028+
}
3029+
public enum CodingKeys: String, CodingKey {
3030+
case id
3031+
case name
3032+
case color
3033+
}
3034+
}
3035+
/// Details about the selected option (only present for single_select fields)
3036+
///
3037+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option`.
3038+
public var singleSelectOption: Components.Schemas.IssueFieldValue.SingleSelectOptionPayload?
3039+
/// Creates a new `IssueFieldValue`.
3040+
///
3041+
/// - Parameters:
3042+
/// - issueFieldId: Unique identifier for the issue field.
3043+
/// - nodeId:
3044+
/// - dataType: The data type of the issue field
3045+
/// - value: The value of the issue field
3046+
/// - singleSelectOption: Details about the selected option (only present for single_select fields)
3047+
public init(
3048+
issueFieldId: Swift.Int64,
3049+
nodeId: Swift.String,
3050+
dataType: Components.Schemas.IssueFieldValue.DataTypePayload,
3051+
value: Components.Schemas.IssueFieldValue.ValuePayload? = nil,
3052+
singleSelectOption: Components.Schemas.IssueFieldValue.SingleSelectOptionPayload? = nil
3053+
) {
3054+
self.issueFieldId = issueFieldId
3055+
self.nodeId = nodeId
3056+
self.dataType = dataType
3057+
self.value = value
3058+
self.singleSelectOption = singleSelectOption
3059+
}
3060+
public enum CodingKeys: String, CodingKey {
3061+
case issueFieldId = "issue_field_id"
3062+
case nodeId = "node_id"
3063+
case dataType = "data_type"
3064+
case value
3065+
case singleSelectOption = "single_select_option"
3066+
}
3067+
}
29103068
/// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects.
29113069
///
29123070
/// - Remark: Generated from `#/components/schemas/issue`.
@@ -3141,6 +3299,8 @@ public enum Components {
31413299
public var subIssuesSummary: Components.Schemas.SubIssuesSummary?
31423300
/// - Remark: Generated from `#/components/schemas/issue/issue_dependencies_summary`.
31433301
public var issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary?
3302+
/// - Remark: Generated from `#/components/schemas/issue/issue_field_values`.
3303+
public var issueFieldValues: [Components.Schemas.IssueFieldValue]?
31443304
/// Creates a new `Issue`.
31453305
///
31463306
/// - Parameters:
@@ -3181,6 +3341,7 @@ public enum Components {
31813341
/// - reactions:
31823342
/// - subIssuesSummary:
31833343
/// - issueDependenciesSummary:
3344+
/// - issueFieldValues:
31843345
public init(
31853346
id: Swift.Int64,
31863347
nodeId: Swift.String,
@@ -3218,7 +3379,8 @@ public enum Components {
32183379
authorAssociation: Components.Schemas.AuthorAssociation,
32193380
reactions: Components.Schemas.ReactionRollup? = nil,
32203381
subIssuesSummary: Components.Schemas.SubIssuesSummary? = nil,
3221-
issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? = nil
3382+
issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? = nil,
3383+
issueFieldValues: [Components.Schemas.IssueFieldValue]? = nil
32223384
) {
32233385
self.id = id
32243386
self.nodeId = nodeId
@@ -3257,6 +3419,7 @@ public enum Components {
32573419
self.reactions = reactions
32583420
self.subIssuesSummary = subIssuesSummary
32593421
self.issueDependenciesSummary = issueDependenciesSummary
3422+
self.issueFieldValues = issueFieldValues
32603423
}
32613424
public enum CodingKeys: String, CodingKey {
32623425
case id
@@ -3296,6 +3459,7 @@ public enum Components {
32963459
case reactions
32973460
case subIssuesSummary = "sub_issues_summary"
32983461
case issueDependenciesSummary = "issue_dependencies_summary"
3462+
case issueFieldValues = "issue_field_values"
32993463
}
33003464
}
33013465
/// Comments provide a way for people to collaborate on an issue.

0 commit comments

Comments
 (0)