Skip to content

Commit 9656835

Browse files
Commit via running ake Sources/repos
1 parent e32cd62 commit 9656835

File tree

2 files changed

+163
-4
lines changed

2 files changed

+163
-4
lines changed

Sources/repos/Client.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8476,7 +8476,7 @@ public struct Client: APIProtocol {
84768476
return .unprocessableContent(.init(body: body))
84778477
case 409:
84788478
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
8479-
let body: Components.Responses.conflict.Body
8479+
let body: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body
84808480
let chosenContentType = try converter.bestContentType(
84818481
received: contentType,
84828482
options: [
@@ -8486,7 +8486,7 @@ public struct Client: APIProtocol {
84868486
switch chosenContentType {
84878487
case "application/json":
84888488
body = try await converter.getResponseBodyAsJSON(
8489-
Components.Schemas.basic_hyphen_error.self,
8489+
Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body.jsonPayload.self,
84908490
from: responseBody,
84918491
transforming: { value in
84928492
.json(value)

Sources/repos/Types.swift

Lines changed: 161 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18726,6 +18726,102 @@ public enum Components {
1872618726
case commit
1872718727
}
1872818728
}
18729+
/// The ID of the push protection bypass placeholder. This value is returned on any push protected routes.
18730+
///
18731+
/// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id`.
18732+
public typealias secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id = Swift.String
18733+
/// Repository rule violation was detected
18734+
///
18735+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error`.
18736+
public struct repository_hyphen_rule_hyphen_violation_hyphen_error: Codable, Hashable, Sendable {
18737+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/message`.
18738+
public var message: Swift.String?
18739+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/documentation_url`.
18740+
public var documentation_url: Swift.String?
18741+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/status`.
18742+
public var status: Swift.String?
18743+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`.
18744+
public struct metadataPayload: Codable, Hashable, Sendable {
18745+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`.
18746+
public struct secret_scanningPayload: Codable, Hashable, Sendable {
18747+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload`.
18748+
public struct bypass_placeholdersPayloadPayload: Codable, Hashable, Sendable {
18749+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/placeholder_id`.
18750+
public var placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id?
18751+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/token_type`.
18752+
public var token_type: Swift.String?
18753+
/// Creates a new `bypass_placeholdersPayloadPayload`.
18754+
///
18755+
/// - Parameters:
18756+
/// - placeholder_id:
18757+
/// - token_type:
18758+
public init(
18759+
placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id? = nil,
18760+
token_type: Swift.String? = nil
18761+
) {
18762+
self.placeholder_id = placeholder_id
18763+
self.token_type = token_type
18764+
}
18765+
public enum CodingKeys: String, CodingKey {
18766+
case placeholder_id
18767+
case token_type
18768+
}
18769+
}
18770+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`.
18771+
public typealias bypass_placeholdersPayload = [Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayloadPayload]
18772+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`.
18773+
public var bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload?
18774+
/// Creates a new `secret_scanningPayload`.
18775+
///
18776+
/// - Parameters:
18777+
/// - bypass_placeholders:
18778+
public init(bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload? = nil) {
18779+
self.bypass_placeholders = bypass_placeholders
18780+
}
18781+
public enum CodingKeys: String, CodingKey {
18782+
case bypass_placeholders
18783+
}
18784+
}
18785+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`.
18786+
public var secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload?
18787+
/// Creates a new `metadataPayload`.
18788+
///
18789+
/// - Parameters:
18790+
/// - secret_scanning:
18791+
public init(secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload? = nil) {
18792+
self.secret_scanning = secret_scanning
18793+
}
18794+
public enum CodingKeys: String, CodingKey {
18795+
case secret_scanning
18796+
}
18797+
}
18798+
/// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`.
18799+
public var metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload?
18800+
/// Creates a new `repository_hyphen_rule_hyphen_violation_hyphen_error`.
18801+
///
18802+
/// - Parameters:
18803+
/// - message:
18804+
/// - documentation_url:
18805+
/// - status:
18806+
/// - metadata:
18807+
public init(
18808+
message: Swift.String? = nil,
18809+
documentation_url: Swift.String? = nil,
18810+
status: Swift.String? = nil,
18811+
metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload? = nil
18812+
) {
18813+
self.message = message
18814+
self.documentation_url = documentation_url
18815+
self.status = status
18816+
self.metadata = metadata
18817+
}
18818+
public enum CodingKeys: String, CodingKey {
18819+
case message
18820+
case documentation_url
18821+
case status
18822+
case metadata
18823+
}
18824+
}
1872918825
/// Contributor
1873018826
///
1873118827
/// - Remark: Generated from `#/components/schemas/contributor`.
@@ -40466,17 +40562,80 @@ public enum Operations {
4046640562
}
4046740563
}
4046840564
}
40565+
public struct Conflict: Sendable, Hashable {
40566+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content`.
40567+
@frozen public enum Body: Sendable, Hashable {
40568+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/json`.
40569+
@frozen public enum jsonPayload: Codable, Hashable, Sendable {
40570+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/json/case1`.
40571+
case basic_hyphen_error(Components.Schemas.basic_hyphen_error)
40572+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/json/case2`.
40573+
case repository_hyphen_rule_hyphen_violation_hyphen_error(Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error)
40574+
public init(from decoder: any Decoder) throws {
40575+
var errors: [any Error] = []
40576+
do {
40577+
self = .basic_hyphen_error(try .init(from: decoder))
40578+
return
40579+
} catch {
40580+
errors.append(error)
40581+
}
40582+
do {
40583+
self = .repository_hyphen_rule_hyphen_violation_hyphen_error(try .init(from: decoder))
40584+
return
40585+
} catch {
40586+
errors.append(error)
40587+
}
40588+
throw Swift.DecodingError.failedToDecodeOneOfSchema(
40589+
type: Self.self,
40590+
codingPath: decoder.codingPath,
40591+
errors: errors
40592+
)
40593+
}
40594+
public func encode(to encoder: any Encoder) throws {
40595+
switch self {
40596+
case let .basic_hyphen_error(value):
40597+
try value.encode(to: encoder)
40598+
case let .repository_hyphen_rule_hyphen_violation_hyphen_error(value):
40599+
try value.encode(to: encoder)
40600+
}
40601+
}
40602+
}
40603+
/// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/application\/json`.
40604+
case json(Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body.jsonPayload)
40605+
/// The associated value of the enum case if `self` is `.json`.
40606+
///
40607+
/// - Throws: An error if `self` is not `.json`.
40608+
/// - SeeAlso: `.json`.
40609+
public var json: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body.jsonPayload {
40610+
get throws {
40611+
switch self {
40612+
case let .json(body):
40613+
return body
40614+
}
40615+
}
40616+
}
40617+
}
40618+
/// Received HTTP response body
40619+
public var body: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body
40620+
/// Creates a new `Conflict`.
40621+
///
40622+
/// - Parameters:
40623+
/// - body: Received HTTP response body
40624+
public init(body: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body) {
40625+
self.body = body
40626+
}
40627+
}
4046940628
/// Conflict
4047040629
///
4047140630
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/put(repos/create-or-update-file-contents)/responses/409`.
4047240631
///
4047340632
/// HTTP response code: `409 conflict`.
40474-
case conflict(Components.Responses.conflict)
40633+
case conflict(Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict)
4047540634
/// The associated value of the enum case if `self` is `.conflict`.
4047640635
///
4047740636
/// - Throws: An error if `self` is not `.conflict`.
4047840637
/// - SeeAlso: `.conflict`.
40479-
public var conflict: Components.Responses.conflict {
40638+
public var conflict: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict {
4048040639
get throws {
4048140640
switch self {
4048240641
case let .conflict(response):

0 commit comments

Comments
 (0)