Skip to content

Commit 92e63fe

Browse files
committed
generater update
1 parent a309346 commit 92e63fe

File tree

2,331 files changed

+29101
-3751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,331 files changed

+29101
-3751
lines changed

etc/openapi-client-generator.state

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubAE\Attribute\CastUnionToType\Schema\Deployment;
6+
7+
use ApiClients\Client\GitHubAE\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Payload implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === '') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\Deployment\Payload\Zero::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
}
35+
36+
return $value;
37+
}
38+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubAE\Attribute\CastUnionToType\Schema\Environment\ProtectionRules\One\Reviewers;
6+
7+
use ApiClients\Client\GitHubAE\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Reviewer implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === 'name|email|login|id|node_id|avatar_url|gravatar_id|url|html_url|followers_url|following_url|gists_url|starred_url|subscriptions_url|organizations_url|repos_url|events_url|received_events_url|type|site_admin|starred_at') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\SimpleUser::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
35+
if ($signature === 'id|node_id|name|slug|description|privacy|notification_setting|permission|permissions|url|html_url|members_url|repositories_url|parent') {
36+
try {
37+
return $hydrator->hydrateObject(Schema\Team::class, $value);
38+
} catch (Throwable) {
39+
}
40+
}
41+
}
42+
43+
return $value;
44+
}
45+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubAE\Attribute\CastUnionToType\Schema\Installation;
6+
7+
use ApiClients\Client\GitHubAE\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Account implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === 'name|email|login|id|node_id|avatar_url|gravatar_id|url|html_url|followers_url|following_url|gists_url|starred_url|subscriptions_url|organizations_url|repos_url|events_url|received_events_url|type|site_admin|starred_at') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\SimpleUser::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
35+
if ($signature === 'description|html_url|website_url|id|node_id|name|slug|created_at|updated_at|avatar_url') {
36+
try {
37+
return $hydrator->hydrateObject(Schema\Enterprise::class, $value);
38+
} catch (Throwable) {
39+
}
40+
}
41+
}
42+
43+
return $value;
44+
}
45+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubAE\Attribute\CastUnionToType\Schema\IntegrationInstallationRequest;
6+
7+
use ApiClients\Client\GitHubAE\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Account implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === 'name|email|login|id|node_id|avatar_url|gravatar_id|url|html_url|followers_url|following_url|gists_url|starred_url|subscriptions_url|organizations_url|repos_url|events_url|received_events_url|type|site_admin|starred_at') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\SimpleUser::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
35+
if ($signature === 'description|html_url|website_url|id|node_id|name|slug|created_at|updated_at|avatar_url') {
36+
try {
37+
return $hydrator->hydrateObject(Schema\Enterprise::class, $value);
38+
} catch (Throwable) {
39+
}
40+
}
41+
}
42+
43+
return $value;
44+
}
45+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubAE\Attribute\CastUnionToType\Schema\Repos\CreateDeployment\Request\ApplicationJson;
6+
7+
use ApiClients\Client\GitHubAE\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Payload implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === '') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\Repos\CreateDeployment\Request\ApplicationJson\Payload\Zero::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
}
35+
36+
return $value;
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubAE\Attribute\CastUnionToType\Schema\Repos\UpdateInformationAboutPagesSite\Request\ApplicationJson;
6+
7+
use ApiClients\Client\GitHubAE\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Source implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === 'branch|path' && ($value['path'] === '/' || $value['path'] === '/docs')) {
29+
try {
30+
return $hydrator->hydrateObject(Schema\Repos\UpdateInformationAboutPagesSite\Request\ApplicationJson\Source\One::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
}
35+
36+
return $value;
37+
}
38+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubAE\Attribute\CastUnionToType\Schema\SecretScanningLocation;
6+
7+
use ApiClients\Client\GitHubAE\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Details implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === 'path|start_line|end_line|start_column|end_column|blob_sha|blob_url|commit_sha|commit_url') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\SecretScanningLocationCommit::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
35+
if ($signature === 'issue_title_url') {
36+
try {
37+
return $hydrator->hydrateObject(Schema\SecretScanningLocationIssueTitle::class, $value);
38+
} catch (Throwable) {
39+
}
40+
}
41+
42+
if ($signature === 'issue_body_url') {
43+
try {
44+
return $hydrator->hydrateObject(Schema\SecretScanningLocationIssueBody::class, $value);
45+
} catch (Throwable) {
46+
}
47+
}
48+
49+
if ($signature === 'issue_comment_url') {
50+
try {
51+
return $hydrator->hydrateObject(Schema\SecretScanningLocationIssueComment::class, $value);
52+
} catch (Throwable) {
53+
}
54+
}
55+
}
56+
57+
return $value;
58+
}
59+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubAE\Attribute\CastUnionToType\Schema\WebhookDeploymentCreated\Deployment;
6+
7+
use ApiClients\Client\GitHubAE\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Payload implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === '') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\WebhookDeploymentCreated\Deployment\Payload\Zero::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
}
35+
36+
return $value;
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubAE\Attribute\CastUnionToType\Schema\WebhookDeploymentStatusCreated\Deployment;
6+
7+
use ApiClients\Client\GitHubAE\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Payload implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === '') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\WebhookDeploymentStatusCreated\Deployment\Payload\One::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
}
35+
36+
return $value;
37+
}
38+
}

0 commit comments

Comments
 (0)