Skip to content

Commit f978f97

Browse files
Commit via running: make Sources/projects
1 parent 1cbadcc commit f978f97

File tree

1 file changed

+156
-8
lines changed

1 file changed

+156
-8
lines changed

Sources/projects/Types.swift

Lines changed: 156 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5926,10 +5926,47 @@ public enum Operations {
59265926
///
59275927
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/q`.
59285928
public var q: Swift.String?
5929+
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/fields`.
5930+
@frozen public enum FieldsPayload: Codable, Hashable, Sendable {
5931+
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/fields/case1`.
5932+
case case1(Swift.String)
5933+
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/fields/case2`.
5934+
case case2([Swift.String])
5935+
public init(from decoder: any Decoder) throws {
5936+
var errors: [any Error] = []
5937+
do {
5938+
self = .case1(try decoder.decodeFromSingleValueContainer())
5939+
return
5940+
} catch {
5941+
errors.append(error)
5942+
}
5943+
do {
5944+
self = .case2(try decoder.decodeFromSingleValueContainer())
5945+
return
5946+
} catch {
5947+
errors.append(error)
5948+
}
5949+
throw Swift.DecodingError.failedToDecodeOneOfSchema(
5950+
type: Self.self,
5951+
codingPath: decoder.codingPath,
5952+
errors: errors
5953+
)
5954+
}
5955+
public func encode(to encoder: any Encoder) throws {
5956+
switch self {
5957+
case let .case1(value):
5958+
try encoder.encodeToSingleValueContainer(value)
5959+
case let .case2(value):
5960+
try encoder.encodeToSingleValueContainer(value)
5961+
}
5962+
}
5963+
}
59295964
/// Limit results to specific fields, by their IDs. If not specified, the title field will be returned.
59305965
///
5966+
/// Example: `fields[]=123&fields[]=456&fields[]=789` or `fields=123,456,789`
5967+
///
59315968
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/fields`.
5932-
public var fields: [Swift.String]?
5969+
public var fields: Operations.ProjectsListItemsForOrg.Input.Query.FieldsPayload?
59335970
/// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
59345971
///
59355972
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/before`.
@@ -5952,7 +5989,7 @@ public enum Operations {
59525989
/// - perPage: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
59535990
public init(
59545991
q: Swift.String? = nil,
5955-
fields: [Swift.String]? = nil,
5992+
fields: Operations.ProjectsListItemsForOrg.Input.Query.FieldsPayload? = nil,
59565993
before: Components.Parameters.PaginationBefore? = nil,
59575994
after: Components.Parameters.PaginationAfter? = nil,
59585995
perPage: Components.Parameters.PerPage? = nil
@@ -6475,15 +6512,52 @@ public enum Operations {
64756512
public var path: Operations.ProjectsGetOrgItem.Input.Path
64766513
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query`.
64776514
public struct Query: Sendable, Hashable {
6515+
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query/fields`.
6516+
@frozen public enum FieldsPayload: Codable, Hashable, Sendable {
6517+
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query/fields/case1`.
6518+
case case1(Swift.String)
6519+
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query/fields/case2`.
6520+
case case2([Swift.String])
6521+
public init(from decoder: any Decoder) throws {
6522+
var errors: [any Error] = []
6523+
do {
6524+
self = .case1(try decoder.decodeFromSingleValueContainer())
6525+
return
6526+
} catch {
6527+
errors.append(error)
6528+
}
6529+
do {
6530+
self = .case2(try decoder.decodeFromSingleValueContainer())
6531+
return
6532+
} catch {
6533+
errors.append(error)
6534+
}
6535+
throw Swift.DecodingError.failedToDecodeOneOfSchema(
6536+
type: Self.self,
6537+
codingPath: decoder.codingPath,
6538+
errors: errors
6539+
)
6540+
}
6541+
public func encode(to encoder: any Encoder) throws {
6542+
switch self {
6543+
case let .case1(value):
6544+
try encoder.encodeToSingleValueContainer(value)
6545+
case let .case2(value):
6546+
try encoder.encodeToSingleValueContainer(value)
6547+
}
6548+
}
6549+
}
64786550
/// Limit results to specific fields, by their IDs. If not specified, the title field will be returned.
64796551
///
6552+
/// Example: fields[]=123&fields[]=456&fields[]=789 or fields=123,456,789
6553+
///
64806554
/// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query/fields`.
6481-
public var fields: [Swift.String]?
6555+
public var fields: Operations.ProjectsGetOrgItem.Input.Query.FieldsPayload?
64826556
/// Creates a new `Query`.
64836557
///
64846558
/// - Parameters:
64856559
/// - fields: Limit results to specific fields, by their IDs. If not specified, the title field will be returned.
6486-
public init(fields: [Swift.String]? = nil) {
6560+
public init(fields: Operations.ProjectsGetOrgItem.Input.Query.FieldsPayload? = nil) {
64876561
self.fields = fields
64886562
}
64896563
}
@@ -8285,10 +8359,47 @@ public enum Operations {
82858359
///
82868360
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/q`.
82878361
public var q: Swift.String?
8362+
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/fields`.
8363+
@frozen public enum FieldsPayload: Codable, Hashable, Sendable {
8364+
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/fields/case1`.
8365+
case case1(Swift.String)
8366+
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/fields/case2`.
8367+
case case2([Swift.String])
8368+
public init(from decoder: any Decoder) throws {
8369+
var errors: [any Error] = []
8370+
do {
8371+
self = .case1(try decoder.decodeFromSingleValueContainer())
8372+
return
8373+
} catch {
8374+
errors.append(error)
8375+
}
8376+
do {
8377+
self = .case2(try decoder.decodeFromSingleValueContainer())
8378+
return
8379+
} catch {
8380+
errors.append(error)
8381+
}
8382+
throw Swift.DecodingError.failedToDecodeOneOfSchema(
8383+
type: Self.self,
8384+
codingPath: decoder.codingPath,
8385+
errors: errors
8386+
)
8387+
}
8388+
public func encode(to encoder: any Encoder) throws {
8389+
switch self {
8390+
case let .case1(value):
8391+
try encoder.encodeToSingleValueContainer(value)
8392+
case let .case2(value):
8393+
try encoder.encodeToSingleValueContainer(value)
8394+
}
8395+
}
8396+
}
82888397
/// Limit results to specific fields, by their IDs. If not specified, the title field will be returned.
82898398
///
8399+
/// Example: `fields[]=123&fields[]=456&fields[]=789` or `fields=123,456,789`
8400+
///
82908401
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/fields`.
8291-
public var fields: [Swift.String]?
8402+
public var fields: Operations.ProjectsListItemsForUser.Input.Query.FieldsPayload?
82928403
/// Creates a new `Query`.
82938404
///
82948405
/// - Parameters:
@@ -8302,7 +8413,7 @@ public enum Operations {
83028413
after: Components.Parameters.PaginationAfter? = nil,
83038414
perPage: Components.Parameters.PerPage? = nil,
83048415
q: Swift.String? = nil,
8305-
fields: [Swift.String]? = nil
8416+
fields: Operations.ProjectsListItemsForUser.Input.Query.FieldsPayload? = nil
83068417
) {
83078418
self.before = before
83088419
self.after = after
@@ -8822,15 +8933,52 @@ public enum Operations {
88228933
public var path: Operations.ProjectsGetUserItem.Input.Path
88238934
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query`.
88248935
public struct Query: Sendable, Hashable {
8936+
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query/fields`.
8937+
@frozen public enum FieldsPayload: Codable, Hashable, Sendable {
8938+
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query/fields/case1`.
8939+
case case1(Swift.String)
8940+
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query/fields/case2`.
8941+
case case2([Swift.String])
8942+
public init(from decoder: any Decoder) throws {
8943+
var errors: [any Error] = []
8944+
do {
8945+
self = .case1(try decoder.decodeFromSingleValueContainer())
8946+
return
8947+
} catch {
8948+
errors.append(error)
8949+
}
8950+
do {
8951+
self = .case2(try decoder.decodeFromSingleValueContainer())
8952+
return
8953+
} catch {
8954+
errors.append(error)
8955+
}
8956+
throw Swift.DecodingError.failedToDecodeOneOfSchema(
8957+
type: Self.self,
8958+
codingPath: decoder.codingPath,
8959+
errors: errors
8960+
)
8961+
}
8962+
public func encode(to encoder: any Encoder) throws {
8963+
switch self {
8964+
case let .case1(value):
8965+
try encoder.encodeToSingleValueContainer(value)
8966+
case let .case2(value):
8967+
try encoder.encodeToSingleValueContainer(value)
8968+
}
8969+
}
8970+
}
88258971
/// Limit results to specific fields, by their IDs. If not specified, the title field will be returned.
88268972
///
8973+
/// Example: fields[]=123&fields[]=456&fields[]=789 or fields=123,456,789
8974+
///
88278975
/// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query/fields`.
8828-
public var fields: [Swift.String]?
8976+
public var fields: Operations.ProjectsGetUserItem.Input.Query.FieldsPayload?
88298977
/// Creates a new `Query`.
88308978
///
88318979
/// - Parameters:
88328980
/// - fields: Limit results to specific fields, by their IDs. If not specified, the title field will be returned.
8833-
public init(fields: [Swift.String]? = nil) {
8981+
public init(fields: Operations.ProjectsGetUserItem.Input.Query.FieldsPayload? = nil) {
88348982
self.fields = fields
88358983
}
88368984
}

0 commit comments

Comments
 (0)