5
5
namespace ApiClients \Client \GitHubEnterpriseCloud \Internal \Hydrator \Operation \Orgs \Org \Copilot \Billing ;
6
6
7
7
use ApiClients \Client \GitHubEnterpriseCloud \Schema \BasicError ;
8
- use ApiClients \Client \GitHubEnterpriseCloud \Schema \Operations \Copilot \AddCopilotSeatsForUsers \Response \ApplicationJson \Created \Application \Json ;
8
+ use ApiClients \Client \GitHubEnterpriseCloud \Schema \Operations \Copilot \AddCopilotSeatsForUsers \Response \ApplicationJson \Created ;
9
+ use ApiClients \Client \GitHubEnterpriseCloud \Schema \Operations \Copilot \CancelCopilotSeatAssignmentForUsers \Response \ApplicationJson \Ok ;
9
10
use EventSauce \ObjectHydrator \IterableList ;
10
11
use EventSauce \ObjectHydrator \ObjectMapper ;
11
12
use EventSauce \ObjectHydrator \PropertySerializers \SerializeArrayItems ;
@@ -39,14 +40,14 @@ public function __construct()
39
40
public function hydrateObject (string $ className , array $ payload ): object
40
41
{
41
42
return match ($ className ) {
42
- 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json ' => $ this ->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created⚡️Application⚡️Json ($ payload ),
43
+ 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created ' => $ this ->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created ($ payload ),
43
44
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError ' => $ this ->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError ($ payload ),
44
- 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json ' => $ this ->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json ($ payload ),
45
+ 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok ' => $ this ->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok ($ payload ),
45
46
default => throw UnableToHydrateObject::noHydrationDefined ($ className , $ this ->hydrationStack ),
46
47
};
47
48
}
48
49
49
- private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created⚡️Application⚡️Json (array $ payload ): Json
50
+ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created (array $ payload ): Created
50
51
{
51
52
$ properties = [];
52
53
$ missingFields = [];
@@ -62,17 +63,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
62
63
63
64
after_seatsCreated:
64
65
} catch (Throwable $ exception ) {
65
- throw UnableToHydrateObject::dueToError ('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json ' , $ exception , stack: $ this ->hydrationStack );
66
+ throw UnableToHydrateObject::dueToError ('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created ' , $ exception , stack: $ this ->hydrationStack );
66
67
}
67
68
68
69
if (count ($ missingFields ) > 0 ) {
69
- throw UnableToHydrateObject::dueToMissingFields (Json ::class, $ missingFields , stack: $ this ->hydrationStack );
70
+ throw UnableToHydrateObject::dueToMissingFields (Created ::class, $ missingFields , stack: $ this ->hydrationStack );
70
71
}
71
72
72
73
try {
73
- return new Json (...$ properties );
74
+ return new Created (...$ properties );
74
75
} catch (Throwable $ exception ) {
75
- throw UnableToHydrateObject::dueToError ('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json ' , $ exception , stack: $ this ->hydrationStack );
76
+ throw UnableToHydrateObject::dueToError ('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created ' , $ exception , stack: $ this ->hydrationStack );
76
77
}
77
78
}
78
79
@@ -139,7 +140,7 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
139
140
}
140
141
}
141
142
142
- private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json (array $ payload ): \ ApiClients \ Client \ GitHubEnterpriseCloud \ Schema \ Operations \ Copilot \ CancelCopilotSeatAssignmentForUsers \ Response \ ApplicationJson \ Ok \ Application \ Json
143
+ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok (array $ payload ): Ok
143
144
{
144
145
$ properties = [];
145
146
$ missingFields = [];
@@ -155,17 +156,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
155
156
156
157
after_seatsCancelled:
157
158
} catch (Throwable $ exception ) {
158
- throw UnableToHydrateObject::dueToError ('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json ' , $ exception , stack: $ this ->hydrationStack );
159
+ throw UnableToHydrateObject::dueToError ('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok ' , $ exception , stack: $ this ->hydrationStack );
159
160
}
160
161
161
162
if (count ($ missingFields ) > 0 ) {
162
- throw UnableToHydrateObject::dueToMissingFields (\ ApiClients \ Client \ GitHubEnterpriseCloud \ Schema \ Operations \ Copilot \ CancelCopilotSeatAssignmentForUsers \ Response \ ApplicationJson \ Ok \ Application \Json ::class, $ missingFields , stack: $ this ->hydrationStack );
163
+ throw UnableToHydrateObject::dueToMissingFields (Ok ::class, $ missingFields , stack: $ this ->hydrationStack );
163
164
}
164
165
165
166
try {
166
- return new \ ApiClients \ Client \ GitHubEnterpriseCloud \ Schema \ Operations \ Copilot \ CancelCopilotSeatAssignmentForUsers \ Response \ ApplicationJson \ Ok \ Application \ Json (...$ properties );
167
+ return new Ok (...$ properties );
167
168
} catch (Throwable $ exception ) {
168
- throw UnableToHydrateObject::dueToError ('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json ' , $ exception , stack: $ this ->hydrationStack );
169
+ throw UnableToHydrateObject::dueToError ('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok ' , $ exception , stack: $ this ->hydrationStack );
169
170
}
170
171
}
171
172
@@ -200,9 +201,9 @@ public function serializeObjectOfType(object $object, string $className): mixed
200
201
'DateTime ' => $ this ->serializeValueDateTime ($ object ),
201
202
'DateTimeImmutable ' => $ this ->serializeValueDateTimeImmutable ($ object ),
202
203
'DateTimeInterface ' => $ this ->serializeValueDateTimeInterface ($ object ),
203
- 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json ' => $ this ->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created⚡️Application⚡️Json ($ object ),
204
+ 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created ' => $ this ->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created ($ object ),
204
205
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError ' => $ this ->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError ($ object ),
205
- 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json ' => $ this ->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json ($ object ),
206
+ 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok ' => $ this ->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok ($ object ),
206
207
default => throw new LogicException ("No serialization defined for $ className " ),
207
208
};
208
209
} catch (Throwable $ exception ) {
@@ -265,9 +266,9 @@ private function serializeValueDateTimeInterface(mixed $value): mixed
265
266
return $ serializer ->serialize ($ value , $ this );
266
267
}
267
268
268
- private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created⚡️Application⚡️Json (mixed $ object ): mixed
269
+ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created (mixed $ object ): mixed
269
270
{
270
- assert ($ object instanceof Json );
271
+ assert ($ object instanceof Created );
271
272
$ result = [];
272
273
273
274
$ seatsCreated = $ object ->seatsCreated ;
@@ -316,9 +317,9 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
316
317
return $ result ;
317
318
}
318
319
319
- private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json (mixed $ object ): mixed
320
+ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok (mixed $ object ): mixed
320
321
{
321
- assert ($ object instanceof \ ApiClients \ Client \ GitHubEnterpriseCloud \ Schema \ Operations \ Copilot \ CancelCopilotSeatAssignmentForUsers \ Response \ ApplicationJson \ Ok \ Application \Json );
322
+ assert ($ object instanceof Ok );
322
323
$ result = [];
323
324
324
325
$ seatsCancelled = $ object ->seatsCancelled ;
0 commit comments