Skip to content

Commit a72a834

Browse files
authored
Merge pull request #36 from Wei18/dependabot/submodules/Submodule/github/rest-api-description-ad2713c
Bump Submodule/github/rest-api-description from `37bd18b` to `ad2713c`
2 parents ff7ded7 + 0c96789 commit a72a834

File tree

3 files changed

+94
-15
lines changed

3 files changed

+94
-15
lines changed

Sources/copilot/Client.swift

+2
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ public struct Client: APIProtocol {
186186
preconditionFailure("bestContentType chose an invalid content type.")
187187
}
188188
return .notFound(.init(body: body))
189+
case 422:
190+
return .unprocessableContent(.init())
189191
default:
190192
return .undocumented(
191193
statusCode: response.status.code,

Sources/copilot/Types.swift

+91-14
Original file line numberDiff line numberDiff line change
@@ -581,16 +581,40 @@ public enum Components {
581581
public var public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload
582582
/// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor.
583583
///
584-
/// - Remark: Generated from `#/components/schemas/copilot-organization-details/copilot_chat`.
585-
@frozen public enum copilot_chatPayload: String, Codable, Hashable, Sendable {
584+
/// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`.
585+
@frozen public enum ide_chatPayload: String, Codable, Hashable, Sendable {
586586
case enabled = "enabled"
587587
case disabled = "disabled"
588588
case unconfigured = "unconfigured"
589589
}
590590
/// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor.
591591
///
592-
/// - Remark: Generated from `#/components/schemas/copilot-organization-details/copilot_chat`.
593-
public var copilot_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.copilot_chatPayload?
592+
/// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`.
593+
public var ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload?
594+
/// The organization policy for allowing or disallowing organization members to use Copilot features within github.com.
595+
///
596+
/// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`.
597+
@frozen public enum platform_chatPayload: String, Codable, Hashable, Sendable {
598+
case enabled = "enabled"
599+
case disabled = "disabled"
600+
case unconfigured = "unconfigured"
601+
}
602+
/// The organization policy for allowing or disallowing organization members to use Copilot features within github.com.
603+
///
604+
/// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`.
605+
public var platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload?
606+
/// The organization policy for allowing or disallowing organization members to use Copilot within their CLI.
607+
///
608+
/// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`.
609+
@frozen public enum cliPayload: String, Codable, Hashable, Sendable {
610+
case enabled = "enabled"
611+
case disabled = "disabled"
612+
case unconfigured = "unconfigured"
613+
}
614+
/// The organization policy for allowing or disallowing organization members to use Copilot within their CLI.
615+
///
616+
/// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`.
617+
public var cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload?
594618
/// The mode of assigning new seats.
595619
///
596620
/// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`.
@@ -611,26 +635,34 @@ public enum Components {
611635
/// - Parameters:
612636
/// - seat_breakdown:
613637
/// - public_code_suggestions: The organization policy for allowing or disallowing Copilot to make suggestions that match public code.
614-
/// - copilot_chat: The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor.
638+
/// - ide_chat: The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor.
639+
/// - platform_chat: The organization policy for allowing or disallowing organization members to use Copilot features within github.com.
640+
/// - cli: The organization policy for allowing or disallowing organization members to use Copilot within their CLI.
615641
/// - seat_management_setting: The mode of assigning new seats.
616642
/// - additionalProperties: A container of undocumented properties.
617643
public init(
618644
seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown,
619645
public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload,
620-
copilot_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.copilot_chatPayload? = nil,
646+
ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload? = nil,
647+
platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? = nil,
648+
cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? = nil,
621649
seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload,
622650
additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()
623651
) {
624652
self.seat_breakdown = seat_breakdown
625653
self.public_code_suggestions = public_code_suggestions
626-
self.copilot_chat = copilot_chat
654+
self.ide_chat = ide_chat
655+
self.platform_chat = platform_chat
656+
self.cli = cli
627657
self.seat_management_setting = seat_management_setting
628658
self.additionalProperties = additionalProperties
629659
}
630660
public enum CodingKeys: String, CodingKey {
631661
case seat_breakdown
632662
case public_code_suggestions
633-
case copilot_chat
663+
case ide_chat
664+
case platform_chat
665+
case cli
634666
case seat_management_setting
635667
}
636668
public init(from decoder: any Decoder) throws {
@@ -643,9 +675,17 @@ public enum Components {
643675
Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload.self,
644676
forKey: .public_code_suggestions
645677
)
646-
copilot_chat = try container.decodeIfPresent(
647-
Components.Schemas.copilot_hyphen_organization_hyphen_details.copilot_chatPayload.self,
648-
forKey: .copilot_chat
678+
ide_chat = try container.decodeIfPresent(
679+
Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload.self,
680+
forKey: .ide_chat
681+
)
682+
platform_chat = try container.decodeIfPresent(
683+
Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload.self,
684+
forKey: .platform_chat
685+
)
686+
cli = try container.decodeIfPresent(
687+
Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload.self,
688+
forKey: .cli
649689
)
650690
seat_management_setting = try container.decode(
651691
Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload.self,
@@ -654,7 +694,9 @@ public enum Components {
654694
additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [
655695
"seat_breakdown",
656696
"public_code_suggestions",
657-
"copilot_chat",
697+
"ide_chat",
698+
"platform_chat",
699+
"cli",
658700
"seat_management_setting"
659701
])
660702
}
@@ -669,8 +711,16 @@ public enum Components {
669711
forKey: .public_code_suggestions
670712
)
671713
try container.encodeIfPresent(
672-
copilot_chat,
673-
forKey: .copilot_chat
714+
ide_chat,
715+
forKey: .ide_chat
716+
)
717+
try container.encodeIfPresent(
718+
platform_chat,
719+
forKey: .platform_chat
720+
)
721+
try container.encodeIfPresent(
722+
cli,
723+
forKey: .cli
674724
)
675725
try container.encode(
676726
seat_management_setting,
@@ -1696,6 +1746,33 @@ public enum Operations {
16961746
}
16971747
}
16981748
}
1749+
public struct UnprocessableContent: Sendable, Hashable {
1750+
/// Creates a new `UnprocessableContent`.
1751+
public init() {}
1752+
}
1753+
/// There is a problem with your account's associated payment method.
1754+
///
1755+
/// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)/responses/422`.
1756+
///
1757+
/// HTTP response code: `422 unprocessableContent`.
1758+
case unprocessableContent(Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Output.UnprocessableContent)
1759+
/// The associated value of the enum case if `self` is `.unprocessableContent`.
1760+
///
1761+
/// - Throws: An error if `self` is not `.unprocessableContent`.
1762+
/// - SeeAlso: `.unprocessableContent`.
1763+
public var unprocessableContent: Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Output.UnprocessableContent {
1764+
get throws {
1765+
switch self {
1766+
case let .unprocessableContent(response):
1767+
return response
1768+
default:
1769+
try throwUnexpectedResponseStatus(
1770+
expectedStatus: "unprocessableContent",
1771+
response: self
1772+
)
1773+
}
1774+
}
1775+
}
16991776
/// Undocumented response.
17001777
///
17011778
/// A response with a code that is not documented in the OpenAPI document.

Submodule/github/rest-api-description

Submodule rest-api-description updated 32 files

0 commit comments

Comments
 (0)