Skip to content

Commit 4fc0bb6

Browse files
committed
Split up Client into multiple smaller files to make it easier to be parsed by tooling and IDE's
1 parent 02f0616 commit 4fc0bb6

File tree

5,349 files changed

+51014
-28035
lines changed

Some content is hidden

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

5,349 files changed

+51014
-28035
lines changed

src/ChunkSize/Delete/Cc11.php

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?php
2+
3+
declare (strict_types=1);
4+
namespace ApiClients\Client\GitHubEnterpriseCloud\ChunkSize\Delete;
5+
6+
use ApiClients\Client\GitHubEnterpriseCloud\Error as ErrorSchemas;
7+
use ApiClients\Client\GitHubEnterpriseCloud\Hydrator;
8+
use ApiClients\Client\GitHubEnterpriseCloud\Operation;
9+
use ApiClients\Client\GitHubEnterpriseCloud\Schema;
10+
use ApiClients\Client\GitHubEnterpriseCloud\WebHook;
11+
use ApiClients\Client\GitHubEnterpriseCloud\Router;
12+
use ApiClients\Client\GitHubEnterpriseCloud\ChunkSize;
13+
final class Cc11
14+
{
15+
private array $router = array();
16+
private readonly \League\OpenAPIValidation\Schema\SchemaValidator $requestSchemaValidator;
17+
private readonly \League\OpenAPIValidation\Schema\SchemaValidator $responseSchemaValidator;
18+
private readonly \ApiClients\Client\GitHubEnterpriseCloud\Hydrators $hydrators;
19+
private readonly \React\Http\Browser $browser;
20+
private readonly \ApiClients\Contracts\HTTP\Headers\AuthenticationInterface $authentication;
21+
public function __construct(\League\OpenAPIValidation\Schema\SchemaValidator $requestSchemaValidator, \League\OpenAPIValidation\Schema\SchemaValidator $responseSchemaValidator, \ApiClients\Client\GitHubEnterpriseCloud\Hydrators $hydrators, \React\Http\Browser $browser, \ApiClients\Contracts\HTTP\Headers\AuthenticationInterface $authentication)
22+
{
23+
$this->requestSchemaValidator = $requestSchemaValidator;
24+
$this->responseSchemaValidator = $responseSchemaValidator;
25+
$this->hydrators = $hydrators;
26+
$this->browser = $browser;
27+
$this->authentication = $authentication;
28+
}
29+
public function call(string $call, array $params, array $pathChunks)
30+
{
31+
if ($pathChunks[0] == '') {
32+
if ($pathChunks[1] == 'orgs') {
33+
if ($pathChunks[2] == '{org}') {
34+
if ($pathChunks[3] == 'teams') {
35+
if ($pathChunks[4] == '{team_slug}') {
36+
if ($pathChunks[5] == 'discussions') {
37+
if ($pathChunks[6] == '{discussion_number}') {
38+
if ($pathChunks[7] == 'comments') {
39+
if ($pathChunks[8] == '{comment_number}') {
40+
if ($pathChunks[9] == 'reactions') {
41+
if ($pathChunks[10] == '{reaction_id}') {
42+
if ($call == 'DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}') {
43+
if (\array_key_exists(Router\Delete\Reactions::class, $this->router) == false) {
44+
$this->router[Router\Delete\Reactions::class] = new Router\Delete\Reactions($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators, $this->browser, $this->authentication);
45+
}
46+
return $this->router[Router\Delete\Reactions::class]->deleteForTeamDiscussionComment($params);
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}
58+
}
59+
throw new \InvalidArgumentException();
60+
}
61+
}

src/ChunkSize/Delete/Cc3.php

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?php
2+
3+
declare (strict_types=1);
4+
namespace ApiClients\Client\GitHubEnterpriseCloud\ChunkSize\Delete;
5+
6+
use ApiClients\Client\GitHubEnterpriseCloud\Error as ErrorSchemas;
7+
use ApiClients\Client\GitHubEnterpriseCloud\Hydrator;
8+
use ApiClients\Client\GitHubEnterpriseCloud\Operation;
9+
use ApiClients\Client\GitHubEnterpriseCloud\Schema;
10+
use ApiClients\Client\GitHubEnterpriseCloud\WebHook;
11+
use ApiClients\Client\GitHubEnterpriseCloud\Router;
12+
use ApiClients\Client\GitHubEnterpriseCloud\ChunkSize;
13+
final class Cc3
14+
{
15+
private array $router = array();
16+
private readonly \League\OpenAPIValidation\Schema\SchemaValidator $requestSchemaValidator;
17+
private readonly \League\OpenAPIValidation\Schema\SchemaValidator $responseSchemaValidator;
18+
private readonly \ApiClients\Client\GitHubEnterpriseCloud\Hydrators $hydrators;
19+
private readonly \React\Http\Browser $browser;
20+
private readonly \ApiClients\Contracts\HTTP\Headers\AuthenticationInterface $authentication;
21+
public function __construct(\League\OpenAPIValidation\Schema\SchemaValidator $requestSchemaValidator, \League\OpenAPIValidation\Schema\SchemaValidator $responseSchemaValidator, \ApiClients\Client\GitHubEnterpriseCloud\Hydrators $hydrators, \React\Http\Browser $browser, \ApiClients\Contracts\HTTP\Headers\AuthenticationInterface $authentication)
22+
{
23+
$this->requestSchemaValidator = $requestSchemaValidator;
24+
$this->responseSchemaValidator = $responseSchemaValidator;
25+
$this->hydrators = $hydrators;
26+
$this->browser = $browser;
27+
$this->authentication = $authentication;
28+
}
29+
public function call(string $call, array $params, array $pathChunks)
30+
{
31+
if ($pathChunks[0] == '') {
32+
if ($pathChunks[1] == 'gists') {
33+
if ($pathChunks[2] == '{gist_id}') {
34+
if ($call == 'DELETE /gists/{gist_id}') {
35+
if (\array_key_exists(Router\Delete\Gists::class, $this->router) == false) {
36+
$this->router[Router\Delete\Gists::class] = new Router\Delete\Gists($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators, $this->browser, $this->authentication);
37+
}
38+
return $this->router[Router\Delete\Gists::class]->delete($params);
39+
}
40+
}
41+
} elseif ($pathChunks[1] == 'installation') {
42+
if ($pathChunks[2] == 'token') {
43+
if ($call == 'DELETE /installation/token') {
44+
if (\array_key_exists(Router\Delete\Apps::class, $this->router) == false) {
45+
$this->router[Router\Delete\Apps::class] = new Router\Delete\Apps($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators, $this->browser, $this->authentication);
46+
}
47+
return $this->router[Router\Delete\Apps::class]->revokeInstallationAccessToken($params);
48+
}
49+
}
50+
} elseif ($pathChunks[1] == 'orgs') {
51+
if ($pathChunks[2] == '{org}') {
52+
if ($call == 'DELETE /orgs/{org}') {
53+
if (\array_key_exists(Router\Delete\Orgs::class, $this->router) == false) {
54+
$this->router[Router\Delete\Orgs::class] = new Router\Delete\Orgs($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators, $this->browser, $this->authentication);
55+
}
56+
return $this->router[Router\Delete\Orgs::class]->delete($params);
57+
}
58+
}
59+
} elseif ($pathChunks[1] == 'projects') {
60+
if ($pathChunks[2] == '{project_id}') {
61+
if ($call == 'DELETE /projects/{project_id}') {
62+
if (\array_key_exists(Router\Delete\Projects::class, $this->router) == false) {
63+
$this->router[Router\Delete\Projects::class] = new Router\Delete\Projects($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators, $this->browser, $this->authentication);
64+
}
65+
return $this->router[Router\Delete\Projects::class]->delete($params);
66+
}
67+
}
68+
} elseif ($pathChunks[1] == 'teams') {
69+
if ($pathChunks[2] == '{team_id}') {
70+
if ($call == 'DELETE /teams/{team_id}') {
71+
if (\array_key_exists(Router\Delete\Teams::class, $this->router) == false) {
72+
$this->router[Router\Delete\Teams::class] = new Router\Delete\Teams($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators, $this->browser, $this->authentication);
73+
}
74+
return $this->router[Router\Delete\Teams::class]->deleteLegacy($params);
75+
}
76+
}
77+
} elseif ($pathChunks[1] == 'user') {
78+
if ($pathChunks[2] == 'emails') {
79+
if ($call == 'DELETE /user/emails') {
80+
if (\array_key_exists(Router\Delete\Users::class, $this->router) == false) {
81+
$this->router[Router\Delete\Users::class] = new Router\Delete\Users($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators, $this->browser, $this->authentication);
82+
}
83+
return $this->router[Router\Delete\Users::class]->deleteEmailForAuthenticatedUser($params);
84+
}
85+
} elseif ($pathChunks[2] == 'interaction-limits') {
86+
if ($call == 'DELETE /user/interaction-limits') {
87+
if (\array_key_exists(Router\Delete\Interactions::class, $this->router) == false) {
88+
$this->router[Router\Delete\Interactions::class] = new Router\Delete\Interactions($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators, $this->browser, $this->authentication);
89+
}
90+
return $this->router[Router\Delete\Interactions::class]->removeRestrictionsForAuthenticatedUser($params);
91+
}
92+
} elseif ($pathChunks[2] == 'social_accounts') {
93+
if ($call == 'DELETE /user/social_accounts') {
94+
if (\array_key_exists(Router\Delete\Users::class, $this->router) == false) {
95+
$this->router[Router\Delete\Users::class] = new Router\Delete\Users($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators, $this->browser, $this->authentication);
96+
}
97+
return $this->router[Router\Delete\Users::class]->deleteSocialAccountForAuthenticatedUser($params);
98+
}
99+
}
100+
}
101+
}
102+
throw new \InvalidArgumentException();
103+
}
104+
}

0 commit comments

Comments
 (0)