Skip to content

Commit 4bedd84

Browse files
Commit via running: make Sources/search
1 parent f7cdf13 commit 4bedd84

File tree

1 file changed

+164
-0
lines changed

1 file changed

+164
-0
lines changed

Sources/search/Types.swift

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,6 +2326,164 @@ public enum Components {
23262326
case totalBlocking = "total_blocking"
23272327
}
23282328
}
2329+
/// A value assigned to an issue field
2330+
///
2331+
/// - Remark: Generated from `#/components/schemas/issue-field-value`.
2332+
public struct IssueFieldValue: Codable, Hashable, Sendable {
2333+
/// Unique identifier for the issue field.
2334+
///
2335+
/// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_id`.
2336+
public var issueFieldId: Swift.Int64
2337+
/// - Remark: Generated from `#/components/schemas/issue-field-value/node_id`.
2338+
public var nodeId: Swift.String
2339+
/// The data type of the issue field
2340+
///
2341+
/// - Remark: Generated from `#/components/schemas/issue-field-value/data_type`.
2342+
@frozen public enum DataTypePayload: String, Codable, Hashable, Sendable, CaseIterable {
2343+
case text = "text"
2344+
case singleSelect = "single_select"
2345+
case number = "number"
2346+
case date = "date"
2347+
}
2348+
/// The data type of the issue field
2349+
///
2350+
/// - Remark: Generated from `#/components/schemas/issue-field-value/data_type`.
2351+
public var dataType: Components.Schemas.IssueFieldValue.DataTypePayload
2352+
/// The value of the issue field
2353+
///
2354+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value`.
2355+
public struct ValuePayload: Codable, Hashable, Sendable {
2356+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value/value1`.
2357+
public var value1: Swift.String?
2358+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value/value2`.
2359+
public var value2: Swift.Double?
2360+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value/value3`.
2361+
public var value3: Swift.Int?
2362+
/// Creates a new `ValuePayload`.
2363+
///
2364+
/// - Parameters:
2365+
/// - value1:
2366+
/// - value2:
2367+
/// - value3:
2368+
public init(
2369+
value1: Swift.String? = nil,
2370+
value2: Swift.Double? = nil,
2371+
value3: Swift.Int? = nil
2372+
) {
2373+
self.value1 = value1
2374+
self.value2 = value2
2375+
self.value3 = value3
2376+
}
2377+
public init(from decoder: any Decoder) throws {
2378+
var errors: [any Error] = []
2379+
do {
2380+
self.value1 = try decoder.decodeFromSingleValueContainer()
2381+
} catch {
2382+
errors.append(error)
2383+
}
2384+
do {
2385+
self.value2 = try decoder.decodeFromSingleValueContainer()
2386+
} catch {
2387+
errors.append(error)
2388+
}
2389+
do {
2390+
self.value3 = try decoder.decodeFromSingleValueContainer()
2391+
} catch {
2392+
errors.append(error)
2393+
}
2394+
try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil(
2395+
[
2396+
self.value1,
2397+
self.value2,
2398+
self.value3
2399+
],
2400+
type: Self.self,
2401+
codingPath: decoder.codingPath,
2402+
errors: errors
2403+
)
2404+
}
2405+
public func encode(to encoder: any Encoder) throws {
2406+
try encoder.encodeFirstNonNilValueToSingleValueContainer([
2407+
self.value1,
2408+
self.value2,
2409+
self.value3
2410+
])
2411+
}
2412+
}
2413+
/// The value of the issue field
2414+
///
2415+
/// - Remark: Generated from `#/components/schemas/issue-field-value/value`.
2416+
public var value: Components.Schemas.IssueFieldValue.ValuePayload?
2417+
/// Details about the selected option (only present for single_select fields)
2418+
///
2419+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option`.
2420+
public struct SingleSelectOptionPayload: Codable, Hashable, Sendable {
2421+
/// Unique identifier for the option.
2422+
///
2423+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/id`.
2424+
public var id: Swift.Int64
2425+
/// The name of the option
2426+
///
2427+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/name`.
2428+
public var name: Swift.String
2429+
/// The color of the option
2430+
///
2431+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/color`.
2432+
public var color: Swift.String
2433+
/// Creates a new `SingleSelectOptionPayload`.
2434+
///
2435+
/// - Parameters:
2436+
/// - id: Unique identifier for the option.
2437+
/// - name: The name of the option
2438+
/// - color: The color of the option
2439+
public init(
2440+
id: Swift.Int64,
2441+
name: Swift.String,
2442+
color: Swift.String
2443+
) {
2444+
self.id = id
2445+
self.name = name
2446+
self.color = color
2447+
}
2448+
public enum CodingKeys: String, CodingKey {
2449+
case id
2450+
case name
2451+
case color
2452+
}
2453+
}
2454+
/// Details about the selected option (only present for single_select fields)
2455+
///
2456+
/// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option`.
2457+
public var singleSelectOption: Components.Schemas.IssueFieldValue.SingleSelectOptionPayload?
2458+
/// Creates a new `IssueFieldValue`.
2459+
///
2460+
/// - Parameters:
2461+
/// - issueFieldId: Unique identifier for the issue field.
2462+
/// - nodeId:
2463+
/// - dataType: The data type of the issue field
2464+
/// - value: The value of the issue field
2465+
/// - singleSelectOption: Details about the selected option (only present for single_select fields)
2466+
public init(
2467+
issueFieldId: Swift.Int64,
2468+
nodeId: Swift.String,
2469+
dataType: Components.Schemas.IssueFieldValue.DataTypePayload,
2470+
value: Components.Schemas.IssueFieldValue.ValuePayload? = nil,
2471+
singleSelectOption: Components.Schemas.IssueFieldValue.SingleSelectOptionPayload? = nil
2472+
) {
2473+
self.issueFieldId = issueFieldId
2474+
self.nodeId = nodeId
2475+
self.dataType = dataType
2476+
self.value = value
2477+
self.singleSelectOption = singleSelectOption
2478+
}
2479+
public enum CodingKeys: String, CodingKey {
2480+
case issueFieldId = "issue_field_id"
2481+
case nodeId = "node_id"
2482+
case dataType = "data_type"
2483+
case value
2484+
case singleSelectOption = "single_select_option"
2485+
}
2486+
}
23292487
/// - Remark: Generated from `#/components/schemas/security-and-analysis`.
23302488
public struct SecurityAndAnalysis: Codable, Hashable, Sendable {
23312489
/// Enable or disable GitHub Advanced Security for the repository.
@@ -3729,6 +3887,8 @@ public enum Components {
37293887
public var subIssuesSummary: Components.Schemas.SubIssuesSummary?
37303888
/// - Remark: Generated from `#/components/schemas/issue-search-result-item/issue_dependencies_summary`.
37313889
public var issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary?
3890+
/// - Remark: Generated from `#/components/schemas/issue-search-result-item/issue_field_values`.
3891+
public var issueFieldValues: [Components.Schemas.IssueFieldValue]?
37323892
/// - Remark: Generated from `#/components/schemas/issue-search-result-item/state`.
37333893
public var state: Swift.String
37343894
/// - Remark: Generated from `#/components/schemas/issue-search-result-item/state_reason`.
@@ -3832,6 +3992,7 @@ public enum Components {
38323992
/// - labels:
38333993
/// - subIssuesSummary:
38343994
/// - issueDependenciesSummary:
3995+
/// - issueFieldValues:
38353996
/// - state:
38363997
/// - stateReason:
38373998
/// - assignee:
@@ -3871,6 +4032,7 @@ public enum Components {
38714032
labels: Components.Schemas.IssueSearchResultItem.LabelsPayload,
38724033
subIssuesSummary: Components.Schemas.SubIssuesSummary? = nil,
38734034
issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? = nil,
4035+
issueFieldValues: [Components.Schemas.IssueFieldValue]? = nil,
38744036
state: Swift.String,
38754037
stateReason: Swift.String? = nil,
38764038
assignee: Components.Schemas.NullableSimpleUser? = nil,
@@ -3910,6 +4072,7 @@ public enum Components {
39104072
self.labels = labels
39114073
self.subIssuesSummary = subIssuesSummary
39124074
self.issueDependenciesSummary = issueDependenciesSummary
4075+
self.issueFieldValues = issueFieldValues
39134076
self.state = state
39144077
self.stateReason = stateReason
39154078
self.assignee = assignee
@@ -3950,6 +4113,7 @@ public enum Components {
39504113
case labels
39514114
case subIssuesSummary = "sub_issues_summary"
39524115
case issueDependenciesSummary = "issue_dependencies_summary"
4116+
case issueFieldValues = "issue_field_values"
39534117
case state
39544118
case stateReason = "state_reason"
39554119
case assignee

0 commit comments

Comments
 (0)