Skip to content

Commit a2de071

Browse files
Commit via running ake Sources/reactions
1 parent b50e40b commit a2de071

File tree

1 file changed

+129
-129
lines changed

1 file changed

+129
-129
lines changed

Sources/reactions/Types.swift

Lines changed: 129 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,131 @@ public enum Components {
766766
case status
767767
}
768768
}
769+
/// Validation Error
770+
///
771+
/// - Remark: Generated from `#/components/schemas/validation-error`.
772+
public struct validation_hyphen_error: Codable, Hashable, Sendable {
773+
/// - Remark: Generated from `#/components/schemas/validation-error/message`.
774+
public var message: Swift.String
775+
/// - Remark: Generated from `#/components/schemas/validation-error/documentation_url`.
776+
public var documentation_url: Swift.String
777+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload`.
778+
public struct errorsPayloadPayload: Codable, Hashable, Sendable {
779+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/resource`.
780+
public var resource: Swift.String?
781+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/field`.
782+
public var field: Swift.String?
783+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/message`.
784+
public var message: Swift.String?
785+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/code`.
786+
public var code: Swift.String
787+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/index`.
788+
public var index: Swift.Int?
789+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value`.
790+
@frozen public enum valuePayload: Codable, Hashable, Sendable {
791+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value/case1`.
792+
case case1(Swift.String?)
793+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value/case2`.
794+
case case2(Swift.Int?)
795+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value/case3`.
796+
case case3([Swift.String]?)
797+
public init(from decoder: any Decoder) throws {
798+
var errors: [any Error] = []
799+
do {
800+
self = .case1(try decoder.decodeFromSingleValueContainer())
801+
return
802+
} catch {
803+
errors.append(error)
804+
}
805+
do {
806+
self = .case2(try decoder.decodeFromSingleValueContainer())
807+
return
808+
} catch {
809+
errors.append(error)
810+
}
811+
do {
812+
self = .case3(try decoder.decodeFromSingleValueContainer())
813+
return
814+
} catch {
815+
errors.append(error)
816+
}
817+
throw Swift.DecodingError.failedToDecodeOneOfSchema(
818+
type: Self.self,
819+
codingPath: decoder.codingPath,
820+
errors: errors
821+
)
822+
}
823+
public func encode(to encoder: any Encoder) throws {
824+
switch self {
825+
case let .case1(value):
826+
try encoder.encodeToSingleValueContainer(value)
827+
case let .case2(value):
828+
try encoder.encodeToSingleValueContainer(value)
829+
case let .case3(value):
830+
try encoder.encodeToSingleValueContainer(value)
831+
}
832+
}
833+
}
834+
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value`.
835+
public var value: Components.Schemas.validation_hyphen_error.errorsPayloadPayload.valuePayload?
836+
/// Creates a new `errorsPayloadPayload`.
837+
///
838+
/// - Parameters:
839+
/// - resource:
840+
/// - field:
841+
/// - message:
842+
/// - code:
843+
/// - index:
844+
/// - value:
845+
public init(
846+
resource: Swift.String? = nil,
847+
field: Swift.String? = nil,
848+
message: Swift.String? = nil,
849+
code: Swift.String,
850+
index: Swift.Int? = nil,
851+
value: Components.Schemas.validation_hyphen_error.errorsPayloadPayload.valuePayload? = nil
852+
) {
853+
self.resource = resource
854+
self.field = field
855+
self.message = message
856+
self.code = code
857+
self.index = index
858+
self.value = value
859+
}
860+
public enum CodingKeys: String, CodingKey {
861+
case resource
862+
case field
863+
case message
864+
case code
865+
case index
866+
case value
867+
}
868+
}
869+
/// - Remark: Generated from `#/components/schemas/validation-error/errors`.
870+
public typealias errorsPayload = [Components.Schemas.validation_hyphen_error.errorsPayloadPayload]
871+
/// - Remark: Generated from `#/components/schemas/validation-error/errors`.
872+
public var errors: Components.Schemas.validation_hyphen_error.errorsPayload?
873+
/// Creates a new `validation_hyphen_error`.
874+
///
875+
/// - Parameters:
876+
/// - message:
877+
/// - documentation_url:
878+
/// - errors:
879+
public init(
880+
message: Swift.String,
881+
documentation_url: Swift.String,
882+
errors: Components.Schemas.validation_hyphen_error.errorsPayload? = nil
883+
) {
884+
self.message = message
885+
self.documentation_url = documentation_url
886+
self.errors = errors
887+
}
888+
public enum CodingKeys: String, CodingKey {
889+
case message
890+
case documentation_url
891+
case errors
892+
}
893+
}
769894
/// A GitHub user.
770895
///
771896
/// - Remark: Generated from `#/components/schemas/nullable-simple-user`.
@@ -911,131 +1036,6 @@ public enum Components {
9111036
case user_view_type
9121037
}
9131038
}
914-
/// Validation Error
915-
///
916-
/// - Remark: Generated from `#/components/schemas/validation-error`.
917-
public struct validation_hyphen_error: Codable, Hashable, Sendable {
918-
/// - Remark: Generated from `#/components/schemas/validation-error/message`.
919-
public var message: Swift.String
920-
/// - Remark: Generated from `#/components/schemas/validation-error/documentation_url`.
921-
public var documentation_url: Swift.String
922-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload`.
923-
public struct errorsPayloadPayload: Codable, Hashable, Sendable {
924-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/resource`.
925-
public var resource: Swift.String?
926-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/field`.
927-
public var field: Swift.String?
928-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/message`.
929-
public var message: Swift.String?
930-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/code`.
931-
public var code: Swift.String
932-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/index`.
933-
public var index: Swift.Int?
934-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value`.
935-
@frozen public enum valuePayload: Codable, Hashable, Sendable {
936-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value/case1`.
937-
case case1(Swift.String?)
938-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value/case2`.
939-
case case2(Swift.Int?)
940-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value/case3`.
941-
case case3([Swift.String]?)
942-
public init(from decoder: any Decoder) throws {
943-
var errors: [any Error] = []
944-
do {
945-
self = .case1(try decoder.decodeFromSingleValueContainer())
946-
return
947-
} catch {
948-
errors.append(error)
949-
}
950-
do {
951-
self = .case2(try decoder.decodeFromSingleValueContainer())
952-
return
953-
} catch {
954-
errors.append(error)
955-
}
956-
do {
957-
self = .case3(try decoder.decodeFromSingleValueContainer())
958-
return
959-
} catch {
960-
errors.append(error)
961-
}
962-
throw Swift.DecodingError.failedToDecodeOneOfSchema(
963-
type: Self.self,
964-
codingPath: decoder.codingPath,
965-
errors: errors
966-
)
967-
}
968-
public func encode(to encoder: any Encoder) throws {
969-
switch self {
970-
case let .case1(value):
971-
try encoder.encodeToSingleValueContainer(value)
972-
case let .case2(value):
973-
try encoder.encodeToSingleValueContainer(value)
974-
case let .case3(value):
975-
try encoder.encodeToSingleValueContainer(value)
976-
}
977-
}
978-
}
979-
/// - Remark: Generated from `#/components/schemas/validation-error/errorsPayload/value`.
980-
public var value: Components.Schemas.validation_hyphen_error.errorsPayloadPayload.valuePayload?
981-
/// Creates a new `errorsPayloadPayload`.
982-
///
983-
/// - Parameters:
984-
/// - resource:
985-
/// - field:
986-
/// - message:
987-
/// - code:
988-
/// - index:
989-
/// - value:
990-
public init(
991-
resource: Swift.String? = nil,
992-
field: Swift.String? = nil,
993-
message: Swift.String? = nil,
994-
code: Swift.String,
995-
index: Swift.Int? = nil,
996-
value: Components.Schemas.validation_hyphen_error.errorsPayloadPayload.valuePayload? = nil
997-
) {
998-
self.resource = resource
999-
self.field = field
1000-
self.message = message
1001-
self.code = code
1002-
self.index = index
1003-
self.value = value
1004-
}
1005-
public enum CodingKeys: String, CodingKey {
1006-
case resource
1007-
case field
1008-
case message
1009-
case code
1010-
case index
1011-
case value
1012-
}
1013-
}
1014-
/// - Remark: Generated from `#/components/schemas/validation-error/errors`.
1015-
public typealias errorsPayload = [Components.Schemas.validation_hyphen_error.errorsPayloadPayload]
1016-
/// - Remark: Generated from `#/components/schemas/validation-error/errors`.
1017-
public var errors: Components.Schemas.validation_hyphen_error.errorsPayload?
1018-
/// Creates a new `validation_hyphen_error`.
1019-
///
1020-
/// - Parameters:
1021-
/// - message:
1022-
/// - documentation_url:
1023-
/// - errors:
1024-
public init(
1025-
message: Swift.String,
1026-
documentation_url: Swift.String,
1027-
errors: Components.Schemas.validation_hyphen_error.errorsPayload? = nil
1028-
) {
1029-
self.message = message
1030-
self.documentation_url = documentation_url
1031-
self.errors = errors
1032-
}
1033-
public enum CodingKeys: String, CodingKey {
1034-
case message
1035-
case documentation_url
1036-
case errors
1037-
}
1038-
}
10391039
/// Reactions to conversations provide a way to help people express their feelings more simply and effectively.
10401040
///
10411041
/// - Remark: Generated from `#/components/schemas/reaction`.
@@ -1105,10 +1105,6 @@ public enum Components {
11051105
///
11061106
/// - Remark: Generated from `#/components/parameters/page`.
11071107
public typealias page = Swift.Int
1108-
/// The slug of the team name.
1109-
///
1110-
/// - Remark: Generated from `#/components/parameters/team-slug`.
1111-
public typealias team_hyphen_slug = Swift.String
11121108
/// The unique identifier of the comment.
11131109
///
11141110
/// - Remark: Generated from `#/components/parameters/comment-id`.
@@ -1125,6 +1121,10 @@ public enum Components {
11251121
///
11261122
/// - Remark: Generated from `#/components/parameters/org`.
11271123
public typealias org = Swift.String
1124+
/// The slug of the team name.
1125+
///
1126+
/// - Remark: Generated from `#/components/parameters/team-slug`.
1127+
public typealias team_hyphen_slug = Swift.String
11281128
/// The number that identifies the discussion.
11291129
///
11301130
/// - Remark: Generated from `#/components/parameters/discussion-number`.

0 commit comments

Comments
 (0)