Skip to content

Commit 683818a

Browse files
Commit via running: make Sources/issues
1 parent 287d151 commit 683818a

1 file changed

Lines changed: 91 additions & 0 deletions

File tree

Sources/issues/Types.swift

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11350,6 +11350,93 @@ public enum Operations {
1135011350
///
1135111351
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/assignees`.
1135211352
public var assignees: [Swift.String]?
11353+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/IssueFieldValuesPayload`.
11354+
public struct IssueFieldValuesPayloadPayload: Codable, Hashable, Sendable {
11355+
/// The ID of the issue field to set
11356+
///
11357+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/IssueFieldValuesPayload/field_id`.
11358+
public var fieldId: Swift.Int
11359+
/// The value to set for the field
11360+
///
11361+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/IssueFieldValuesPayload/value`.
11362+
@frozen public enum ValuePayload: Codable, Hashable, Sendable {
11363+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/IssueFieldValuesPayload/value/case1`.
11364+
case case1(Swift.String)
11365+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/IssueFieldValuesPayload/value/case2`.
11366+
case case2(Swift.Double)
11367+
public init(from decoder: any Swift.Decoder) throws {
11368+
var errors: [any Swift.Error] = []
11369+
do {
11370+
self = .case1(try decoder.decodeFromSingleValueContainer())
11371+
return
11372+
} catch {
11373+
errors.append(error)
11374+
}
11375+
do {
11376+
self = .case2(try decoder.decodeFromSingleValueContainer())
11377+
return
11378+
} catch {
11379+
errors.append(error)
11380+
}
11381+
throw Swift.DecodingError.failedToDecodeOneOfSchema(
11382+
type: Self.self,
11383+
codingPath: decoder.codingPath,
11384+
errors: errors
11385+
)
11386+
}
11387+
public func encode(to encoder: any Swift.Encoder) throws {
11388+
switch self {
11389+
case let .case1(value):
11390+
try encoder.encodeToSingleValueContainer(value)
11391+
case let .case2(value):
11392+
try encoder.encodeToSingleValueContainer(value)
11393+
}
11394+
}
11395+
}
11396+
/// The value to set for the field
11397+
///
11398+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/IssueFieldValuesPayload/value`.
11399+
public var value: Operations.IssuesCreate.Input.Body.JsonPayload.IssueFieldValuesPayloadPayload.ValuePayload
11400+
/// Creates a new `IssueFieldValuesPayloadPayload`.
11401+
///
11402+
/// - Parameters:
11403+
/// - fieldId: The ID of the issue field to set
11404+
/// - value: The value to set for the field
11405+
public init(
11406+
fieldId: Swift.Int,
11407+
value: Operations.IssuesCreate.Input.Body.JsonPayload.IssueFieldValuesPayloadPayload.ValuePayload
11408+
) {
11409+
self.fieldId = fieldId
11410+
self.value = value
11411+
}
11412+
public enum CodingKeys: String, CodingKey {
11413+
case fieldId = "field_id"
11414+
case value
11415+
}
11416+
public init(from decoder: any Swift.Decoder) throws {
11417+
let container = try decoder.container(keyedBy: CodingKeys.self)
11418+
self.fieldId = try container.decode(
11419+
Swift.Int.self,
11420+
forKey: .fieldId
11421+
)
11422+
self.value = try container.decode(
11423+
Operations.IssuesCreate.Input.Body.JsonPayload.IssueFieldValuesPayloadPayload.ValuePayload.self,
11424+
forKey: .value
11425+
)
11426+
try decoder.ensureNoAdditionalProperties(knownKeys: [
11427+
"field_id",
11428+
"value"
11429+
])
11430+
}
11431+
}
11432+
/// An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Issue fields are only available for organization-owned repositories with the feature enabled. Field values are silently dropped otherwise.
11433+
///
11434+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/issue_field_values`.
11435+
public typealias IssueFieldValuesPayload = [Operations.IssuesCreate.Input.Body.JsonPayload.IssueFieldValuesPayloadPayload]
11436+
/// An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Issue fields are only available for organization-owned repositories with the feature enabled. Field values are silently dropped otherwise.
11437+
///
11438+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/issue_field_values`.
11439+
public var issueFieldValues: Operations.IssuesCreate.Input.Body.JsonPayload.IssueFieldValuesPayload?
1135311440
/// The name of the issue type to associate with this issue. _NOTE: Only users with push access can set the type for new issues. The type is silently dropped otherwise._
1135411441
///
1135511442
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/type`.
@@ -11363,6 +11450,7 @@ public enum Operations {
1136311450
/// - milestone:
1136411451
/// - labels: Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._
1136511452
/// - assignees: Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._
11453+
/// - issueFieldValues: An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Issue fields are only available for organization-owned repositories with the feature enabled. Field values are silently dropped otherwise.
1136611454
/// - _type: The name of the issue type to associate with this issue. _NOTE: Only users with push access can set the type for new issues. The type is silently dropped otherwise._
1136711455
public init(
1136811456
title: Operations.IssuesCreate.Input.Body.JsonPayload.TitlePayload,
@@ -11371,6 +11459,7 @@ public enum Operations {
1137111459
milestone: Operations.IssuesCreate.Input.Body.JsonPayload.MilestonePayload? = nil,
1137211460
labels: Operations.IssuesCreate.Input.Body.JsonPayload.LabelsPayload? = nil,
1137311461
assignees: [Swift.String]? = nil,
11462+
issueFieldValues: Operations.IssuesCreate.Input.Body.JsonPayload.IssueFieldValuesPayload? = nil,
1137411463
_type: Swift.String? = nil
1137511464
) {
1137611465
self.title = title
@@ -11379,6 +11468,7 @@ public enum Operations {
1137911468
self.milestone = milestone
1138011469
self.labels = labels
1138111470
self.assignees = assignees
11471+
self.issueFieldValues = issueFieldValues
1138211472
self._type = _type
1138311473
}
1138411474
public enum CodingKeys: String, CodingKey {
@@ -11388,6 +11478,7 @@ public enum Operations {
1138811478
case milestone
1138911479
case labels
1139011480
case assignees
11481+
case issueFieldValues = "issue_field_values"
1139111482
case _type = "type"
1139211483
}
1139311484
}

0 commit comments

Comments
 (0)