diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index 8bb52824af2..ed232cbdfcd 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "975ed3e1d762d10ff749fca3c2105b5a", + "specHash": "db98add04ce623b04585203c6ced5d4b", "generatedFiles": { "files": [ { @@ -5560,7 +5560,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "69c5de1d9c2ea9c9f4a47c99a158f37c" + "hash": "2af451090a9b56d1994a6dcd8e65f4e2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Actions.php", @@ -5596,7 +5596,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "db17b23c5ac1efafd63ff36b1638e622" + "hash": "946c8e10b9dede0d909c097dff038341" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php", @@ -11574,13 +11574,9 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRuleDetailed.php", "hash": "2ddf01f931848dc8dae3093027c68aa4" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CopilotSeatBreakdown.php", - "hash": "329771699046cdadace0eee81bf5c272" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CopilotOrganizationDetails.php", - "hash": "2050773bcb76af8cf988458a3bfd22a1" + "hash": "2a7341605329a119bd65d5b5e83785a1" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CopilotSeatDetails.php", @@ -25380,7 +25376,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Copilot\/Billing.php", - "hash": "ba0ebdf9ed5de7f8bbfe345861748d2c" + "hash": "3f27e0be70b44a105dbe2f55c5b16945" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Copilot\/Billing\/Seats.php", @@ -27048,7 +27044,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "627acdf6598fb53e73251e26d698c749" + "hash": "f364c8dc89d92f50fd9dbcbd2c7c9bde" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -31945,6 +31941,10 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCodeScanningAlertClosedByUser\/Alert\/DismissalApprovedBy.php", "hash": "2d3e43a91657c1977300fdbc36d37723" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CopilotOrganizationSeatBreakdown.php", + "hash": "4260c5a9ab97fe4ce33b3eb89a8b73d0" } ] }, diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Copilot/Billing.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Copilot/Billing.php index 23d9a034044..d84d5a02076 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Copilot/Billing.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Copilot/Billing.php @@ -6,7 +6,7 @@ use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails; -use ApiClients\Client\GitHub\Schema\CopilotSeatBreakdown; +use ApiClients\Client\GitHub\Schema\CopilotOrganizationSeatBreakdown; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -43,7 +43,7 @@ public function hydrateObject(string $className, array $payload): object { return match ($className) { 'ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotOrganizationDetails($payload), - 'ApiClients\Client\GitHub\Schema\CopilotSeatBreakdown' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotSeatBreakdown($payload), + 'ApiClients\Client\GitHub\Schema\CopilotOrganizationSeatBreakdown' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotOrganizationSeatBreakdown($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; @@ -64,7 +64,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Copi if (is_array($value)) { try { $this->hydrationStack[] = 'seatBreakdown'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotSeatBreakdown($value); + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotOrganizationSeatBreakdown($value); } finally { array_pop($this->hydrationStack); } @@ -154,7 +154,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Copi } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotSeatBreakdown(array $payload): CopilotSeatBreakdown + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotOrganizationSeatBreakdown(array $payload): CopilotOrganizationSeatBreakdown { $properties = []; $missingFields = []; @@ -225,17 +225,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Copi after_inactiveThisCycle: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CopilotSeatBreakdown', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CopilotOrganizationSeatBreakdown', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(CopilotSeatBreakdown::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(CopilotOrganizationSeatBreakdown::class, $missingFields, stack: $this->hydrationStack); } try { - return new CopilotSeatBreakdown(...$properties); + return new CopilotOrganizationSeatBreakdown(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CopilotSeatBreakdown', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CopilotOrganizationSeatBreakdown', $exception, stack: $this->hydrationStack); } } @@ -334,7 +334,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotOrganizationDetails($object), - 'ApiClients\Client\GitHub\Schema\CopilotSeatBreakdown' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotSeatBreakdown($object), + 'ApiClients\Client\GitHub\Schema\CopilotOrganizationSeatBreakdown' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotOrganizationSeatBreakdown($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), default => throw new LogicException("No serialization defined for $className"), }; @@ -404,7 +404,7 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $result = []; $seatBreakdown = $object->seatBreakdown; - $seatBreakdown = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotSeatBreakdown($seatBreakdown); + $seatBreakdown = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotOrganizationSeatBreakdown($seatBreakdown); after_seatBreakdown: $result['seat_breakdown'] = $seatBreakdown; $publicCodeSuggestions = $object->publicCodeSuggestions; @@ -448,9 +448,9 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotSeatBreakdown(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotOrganizationSeatBreakdown(mixed $object): mixed { - assert($object instanceof CopilotSeatBreakdown); + assert($object instanceof CopilotOrganizationSeatBreakdown); $result = []; $total = $object->total; diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index c3888352872..10aef884815 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -836,7 +836,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\CodespacesPublicKey' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀PublicKey()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\CodespacesOrgSecret' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀SecretName()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\ListSelectedReposForOrgSecret\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀SecretName🌀Repositories()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\CopilotOrganizationDetails', '\\ApiClients\\Client\\GitHub\\Schema\\CopilotSeatBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\CopilotOrganizationDetails', '\\ApiClients\\Client\\GitHub\\Schema\\CopilotOrganizationSeatBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\ListCopilotSeats\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀Seats()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\AddCopilotSeatsForTeams\\Response\\ApplicationJson\\Created', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\CancelCopilotSeatAssignmentForTeams\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀SelectedTeams()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\AddCopilotSeatsForUsers\\Response\\ApplicationJson\\Created', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\CancelCopilotSeatAssignmentForUsers\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀SelectedUsers()->hydrateObject($className, $payload), @@ -1214,7 +1214,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\CodespacesPublicKey' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀PublicKey()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\CodespacesOrgSecret' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀SecretName()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\ListSelectedReposForOrgSecret\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀SecretName🌀Repositories()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\CopilotOrganizationDetails', '\\ApiClients\\Client\\GitHub\\Schema\\CopilotSeatBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\CopilotOrganizationDetails', '\\ApiClients\\Client\\GitHub\\Schema\\CopilotOrganizationSeatBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\ListCopilotSeats\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀Seats()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\AddCopilotSeatsForTeams\\Response\\ApplicationJson\\Created', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\CancelCopilotSeatAssignmentForTeams\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀SelectedTeams()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\AddCopilotSeatsForUsers\\Response\\ApplicationJson\\Created', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Copilot\\CancelCopilotSeatAssignmentForUsers\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀SelectedUsers()->serializeObject($object), diff --git a/clients/GitHub/src/Schema/CopilotOrganizationDetails.php b/clients/GitHub/src/Schema/CopilotOrganizationDetails.php index f12466c26c4..6080b842791 100644 --- a/clients/GitHub/src/Schema/CopilotOrganizationDetails.php +++ b/clients/GitHub/src/Schema/CopilotOrganizationDetails.php @@ -19,7 +19,7 @@ "type": "object", "properties": { "seat_breakdown": { - "title": "Copilot Business Seat Breakdown", + "title": "Copilot Seat Breakdown", "type": "object", "properties": { "total": { @@ -36,7 +36,7 @@ }, "pending_invitation": { "type": "integer", - "description": "The number of seats that have been assigned to users that have not yet accepted an invitation to this organization." + "description": "The number of users who have been invited to receive a Copilot seat through this organization." }, "active_this_cycle": { "type": "integer", @@ -53,11 +53,10 @@ "enum": [ "allow", "block", - "unconfigured", - "unknown" + "unconfigured" ], "type": "string", - "description": "The organization policy for allowing or disallowing Copilot to make suggestions that match public code." + "description": "The organization policy for allowing or blocking suggestions matching public code (duplication detection filter)." }, "ide_chat": { "enum": [ @@ -66,7 +65,7 @@ "unconfigured" ], "type": "string", - "description": "The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor." + "description": "The organization policy for allowing or disallowing Copilot Chat in the IDE." }, "platform_chat": { "enum": [ @@ -75,7 +74,7 @@ "unconfigured" ], "type": "string", - "description": "The organization policy for allowing or disallowing organization members to use Copilot features within github.com." + "description": "The organization policy for allowing or disallowing Copilot features on GitHub.com." }, "cli": { "enum": [ @@ -84,7 +83,7 @@ "unconfigured" ], "type": "string", - "description": "The organization policy for allowing or disallowing organization members to use Copilot within their CLI." + "description": "The organization policy for allowing or disallowing Copilot in the CLI." }, "seat_management_setting": { "enum": [ @@ -99,8 +98,7 @@ "plan_type": { "enum": [ "business", - "enterprise", - "unknown" + "enterprise" ], "type": "string", "description": "The Copilot plan of the organization, or the parent enterprise, when applicable." @@ -130,15 +128,15 @@ /** * seatBreakdown: The breakdown of Copilot Business seats for the organization. - * publicCodeSuggestions: The organization policy for allowing or disallowing Copilot to make suggestions that match public code. - * ideChat: The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. - * platformChat: The organization policy for allowing or disallowing organization members to use Copilot features within github.com. - * cli: The organization policy for allowing or disallowing organization members to use Copilot within their CLI. + * publicCodeSuggestions: The organization policy for allowing or blocking suggestions matching public code (duplication detection filter). + * ideChat: The organization policy for allowing or disallowing Copilot Chat in the IDE. + * platformChat: The organization policy for allowing or disallowing Copilot features on GitHub.com. + * cli: The organization policy for allowing or disallowing Copilot in the CLI. * seatManagementSetting: The mode of assigning new seats. * planType: The Copilot plan of the organization, or the parent enterprise, when applicable. */ public function __construct(#[MapFrom('seat_breakdown')] - public Schema\CopilotSeatBreakdown $seatBreakdown, #[MapFrom('public_code_suggestions')] + public Schema\CopilotOrganizationSeatBreakdown $seatBreakdown, #[MapFrom('public_code_suggestions')] public string $publicCodeSuggestions, #[MapFrom('ide_chat')] public string|null $ideChat, #[MapFrom('platform_chat')] public string|null $platformChat, public string|null $cli, #[MapFrom('seat_management_setting')] diff --git a/clients/GitHub/src/Schema/CopilotSeatBreakdown.php b/clients/GitHub/src/Schema/CopilotOrganizationSeatBreakdown.php similarity index 84% rename from clients/GitHub/src/Schema/CopilotSeatBreakdown.php rename to clients/GitHub/src/Schema/CopilotOrganizationSeatBreakdown.php index a7683a7a692..f987b3adac5 100644 --- a/clients/GitHub/src/Schema/CopilotSeatBreakdown.php +++ b/clients/GitHub/src/Schema/CopilotOrganizationSeatBreakdown.php @@ -6,10 +6,10 @@ use EventSauce\ObjectHydrator\MapFrom; -final readonly class CopilotSeatBreakdown +final readonly class CopilotOrganizationSeatBreakdown { public const SCHEMA_JSON = '{ - "title": "Copilot Business Seat Breakdown", + "title": "Copilot Seat Breakdown", "type": "object", "properties": { "total": { @@ -26,7 +26,7 @@ }, "pending_invitation": { "type": "integer", - "description": "The number of seats that have been assigned to users that have not yet accepted an invitation to this organization." + "description": "The number of users who have been invited to receive a Copilot seat through this organization." }, "active_this_cycle": { "type": "integer", @@ -39,7 +39,7 @@ }, "description": "The breakdown of Copilot Business seats for the organization." }'; - public const SCHEMA_TITLE = 'Copilot Business Seat Breakdown'; + public const SCHEMA_TITLE = 'Copilot Seat Breakdown'; public const SCHEMA_DESCRIPTION = 'The breakdown of Copilot Business seats for the organization.'; public const SCHEMA_EXAMPLE_DATA = '{ "total": 5, @@ -54,7 +54,7 @@ * total: The total number of seats being billed for the organization as of the current billing cycle. * addedThisCycle: Seats added during the current billing cycle. * pendingCancellation: The number of seats that are pending cancellation at the end of the current billing cycle. - * pendingInvitation: The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. + * pendingInvitation: The number of users who have been invited to receive a Copilot seat through this organization. * activeThisCycle: The number of seats that have used Copilot during the current billing cycle. * inactiveThisCycle: The number of seats that have not used Copilot during the current billing cycle. */ diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index b5ce0a08b9a..4375646d728 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -75948,8 +75948,8 @@ components: required: - key_id - key - copilot-seat-breakdown: - title: Copilot Business Seat Breakdown + copilot-organization-seat-breakdown: + title: Copilot Seat Breakdown description: The breakdown of Copilot Business seats for the organization. type: object properties: @@ -75966,8 +75966,8 @@ components: of the current billing cycle. pending_invitation: type: integer - description: The number of seats that have been assigned to users that have - not yet accepted an invitation to this organization. + description: The number of users who have been invited to receive a Copilot + seat through this organization. active_this_cycle: type: integer description: The number of seats that have used Copilot during the current @@ -75983,36 +75983,35 @@ components: type: object properties: seat_breakdown: - "$ref": "#/components/schemas/copilot-seat-breakdown" + "$ref": "#/components/schemas/copilot-organization-seat-breakdown" public_code_suggestions: type: string - description: The organization policy for allowing or disallowing Copilot - to make suggestions that match public code. + description: The organization policy for allowing or blocking suggestions + matching public code (duplication detection filter). enum: - allow - block - unconfigured - - unknown ide_chat: type: string - description: The organization policy for allowing or disallowing organization - members to use Copilot Chat within their editor. + description: The organization policy for allowing or disallowing Copilot + Chat in the IDE. enum: - enabled - disabled - unconfigured platform_chat: type: string - description: The organization policy for allowing or disallowing organization - members to use Copilot features within github.com. + description: The organization policy for allowing or disallowing Copilot + features on GitHub.com. enum: - enabled - disabled - unconfigured cli: type: string - description: The organization policy for allowing or disallowing organization - members to use Copilot within their CLI. + description: The organization policy for allowing or disallowing Copilot + in the CLI. enum: - enabled - disabled @@ -76032,7 +76031,6 @@ components: enum: - business - enterprise - - unknown required: - seat_breakdown - public_code_suggestions