Skip to content

Commit 8d064c1

Browse files
committed
Update API generated code (Jane 7.2)
1 parent 3608d7e commit 8d064c1

529 files changed

Lines changed: 3687 additions & 1205 deletions

File tree

Some content is hidden

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

src/Client.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,21 +2517,25 @@ public function session(string $fetch = self::FETCH_OBJECT)
25172517
return $this->executeEndpoint(new \Docker\API\Endpoint\Session(), $fetch);
25182518
}
25192519

2520-
public static function create($httpClient = null, array $additionalPlugins = [])
2520+
public static function create($httpClient = null, array $additionalPlugins = [], array $additionalNormalizers = [])
25212521
{
25222522
if (null === $httpClient) {
25232523
$httpClient = \Http\Discovery\Psr18ClientDiscovery::find();
25242524
$plugins = [];
25252525
$uri = \Http\Discovery\Psr17FactoryDiscovery::findUrlFactory()->createUri('/v1.41');
25262526
$plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri);
25272527
if (\count($additionalPlugins) > 0) {
2528-
$plugins = \array_merge($plugins, $additionalPlugins);
2528+
$plugins = array_merge($plugins, $additionalPlugins);
25292529
}
25302530
$httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins);
25312531
}
25322532
$requestFactory = \Http\Discovery\Psr17FactoryDiscovery::findRequestFactory();
25332533
$streamFactory = \Http\Discovery\Psr17FactoryDiscovery::findStreamFactory();
2534-
$serializer = new \Symfony\Component\Serializer\Serializer([new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \Docker\API\Normalizer\JaneObjectNormalizer()], [new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode(['json_decode_associative' => true]))]);
2534+
$normalizers = [new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \Docker\API\Normalizer\JaneObjectNormalizer()];
2535+
if (\count($additionalNormalizers) > 0) {
2536+
$normalizers = array_merge($normalizers, $additionalNormalizers);
2537+
}
2538+
$serializer = new \Symfony\Component\Serializer\Serializer($normalizers, [new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode(['json_decode_associative' => true]))]);
25352539

25362540
return new static($httpClient, $requestFactory, $serializer, $streamFactory);
25372541
}

src/Endpoint/BuildPrune.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
7676
*/
7777
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
7878
{
79-
if ((null === $contentType) === false && (200 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
79+
if ((null === $contentType) === false && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
8080
return $serializer->deserialize($body, 'Docker\\API\\Model\\BuildPrunePostResponse200', 'json');
8181
}
82-
if ((null === $contentType) === false && (500 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
82+
if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
8383
throw new \Docker\API\Exception\BuildPruneInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
8484
}
8585
}

src/Endpoint/ConfigCreate.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ public function getExtraHeaders(): array
4848
*/
4949
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
5050
{
51-
if ((null === $contentType) === false && (201 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
51+
if ((null === $contentType) === false && (201 === $status && false !== mb_strpos($contentType, 'application/json'))) {
5252
return $serializer->deserialize($body, 'Docker\\API\\Model\\IdResponse', 'json');
5353
}
54-
if ((null === $contentType) === false && (409 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
54+
if ((null === $contentType) === false && (409 === $status && false !== mb_strpos($contentType, 'application/json'))) {
5555
throw new \Docker\API\Exception\ConfigCreateConflictException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
5656
}
57-
if ((null === $contentType) === false && (500 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
57+
if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
5858
throw new \Docker\API\Exception\ConfigCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
5959
}
60-
if ((null === $contentType) === false && (503 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
60+
if ((null === $contentType) === false && (503 === $status && false !== mb_strpos($contentType, 'application/json'))) {
6161
throw new \Docker\API\Exception\ConfigCreateServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
6262
}
6363
}

src/Endpoint/ConfigDelete.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function getMethod(): string
2424

2525
public function getUri(): string
2626
{
27-
return \str_replace(['{id}'], [$this->id], '/configs/{id}');
27+
return str_replace(['{id}'], [$this->id], '/configs/{id}');
2828
}
2929

3030
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
@@ -50,13 +50,13 @@ protected function transformResponseBody(string $body, int $status, \Symfony\Com
5050
{
5151
if (204 === $status) {
5252
}
53-
if ((null === $contentType) === false && (404 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
53+
if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
5454
throw new \Docker\API\Exception\ConfigDeleteNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
5555
}
56-
if ((null === $contentType) === false && (500 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
56+
if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
5757
throw new \Docker\API\Exception\ConfigDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
5858
}
59-
if ((null === $contentType) === false && (503 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
59+
if ((null === $contentType) === false && (503 === $status && false !== mb_strpos($contentType, 'application/json'))) {
6060
throw new \Docker\API\Exception\ConfigDeleteServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
6161
}
6262
}

src/Endpoint/ConfigInspect.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function getMethod(): string
2424

2525
public function getUri(): string
2626
{
27-
return \str_replace(['{id}'], [$this->id], '/configs/{id}');
27+
return str_replace(['{id}'], [$this->id], '/configs/{id}');
2828
}
2929

3030
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
@@ -48,16 +48,16 @@ public function getExtraHeaders(): array
4848
*/
4949
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
5050
{
51-
if ((null === $contentType) === false && (200 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
51+
if ((null === $contentType) === false && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
5252
return $serializer->deserialize($body, 'Docker\\API\\Model\\Config', 'json');
5353
}
54-
if ((null === $contentType) === false && (404 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
54+
if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
5555
throw new \Docker\API\Exception\ConfigInspectNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
5656
}
57-
if ((null === $contentType) === false && (500 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
57+
if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
5858
throw new \Docker\API\Exception\ConfigInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
5959
}
60-
if ((null === $contentType) === false && (503 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
60+
if ((null === $contentType) === false && (503 === $status && false !== mb_strpos($contentType, 'application/json'))) {
6161
throw new \Docker\API\Exception\ConfigInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
6262
}
6363
}

src/Endpoint/ConfigList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
6969
*/
7070
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
7171
{
72-
if ((null === $contentType) === false && (200 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
72+
if ((null === $contentType) === false && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
7373
return $serializer->deserialize($body, 'Docker\\API\\Model\\Config[]', 'json');
7474
}
75-
if ((null === $contentType) === false && (500 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
75+
if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
7676
throw new \Docker\API\Exception\ConfigListInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
7777
}
78-
if ((null === $contentType) === false && (503 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
78+
if ((null === $contentType) === false && (503 === $status && false !== mb_strpos($contentType, 'application/json'))) {
7979
throw new \Docker\API\Exception\ConfigListServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
8080
}
8181
}

src/Endpoint/ConfigUpdate.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function getMethod(): string
3232

3333
public function getUri(): string
3434
{
35-
return \str_replace(['{id}'], [$this->id], '/configs/{id}/update');
35+
return str_replace(['{id}'], [$this->id], '/configs/{id}/update');
3636
}
3737

3838
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
@@ -77,16 +77,16 @@ protected function transformResponseBody(string $body, int $status, \Symfony\Com
7777
{
7878
if (200 === $status) {
7979
}
80-
if ((null === $contentType) === false && (400 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
80+
if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
8181
throw new \Docker\API\Exception\ConfigUpdateBadRequestException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
8282
}
83-
if ((null === $contentType) === false && (404 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
83+
if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
8484
throw new \Docker\API\Exception\ConfigUpdateNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
8585
}
86-
if ((null === $contentType) === false && (500 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
86+
if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
8787
throw new \Docker\API\Exception\ConfigUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
8888
}
89-
if ((null === $contentType) === false && (503 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
89+
if ((null === $contentType) === false && (503 === $status && false !== mb_strpos($contentType, 'application/json'))) {
9090
throw new \Docker\API\Exception\ConfigUpdateServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
9191
}
9292
}

src/Endpoint/ContainerArchive.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function getMethod(): string
3131

3232
public function getUri(): string
3333
{
34-
return \str_replace(['{id}'], [$this->id], '/containers/{id}/archive');
34+
return str_replace(['{id}'], [$this->id], '/containers/{id}/archive');
3535
}
3636

3737
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
@@ -68,7 +68,7 @@ protected function transformResponseBody(string $body, int $status, \Symfony\Com
6868
}
6969
if (400 === $status) {
7070
}
71-
if ((null === $contentType) === false && (404 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
71+
if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
7272
throw new \Docker\API\Exception\ContainerArchiveNotFoundException();
7373
}
7474
if (500 === $status) {

src/Endpoint/ContainerArchiveInfo.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function getMethod(): string
3333

3434
public function getUri(): string
3535
{
36-
return \str_replace(['{id}'], [$this->id], '/containers/{id}/archive');
36+
return str_replace(['{id}'], [$this->id], '/containers/{id}/archive');
3737
}
3838

3939
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
@@ -70,13 +70,13 @@ protected function transformResponseBody(string $body, int $status, \Symfony\Com
7070
{
7171
if (200 === $status) {
7272
}
73-
if ((null === $contentType) === false && (400 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
73+
if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
7474
throw new \Docker\API\Exception\ContainerArchiveInfoBadRequestException($serializer->deserialize($body, 'Docker\\API\\Model\\ContainersIdArchiveHeadResponse400', 'json'));
7575
}
76-
if ((null === $contentType) === false && (404 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
76+
if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
7777
throw new \Docker\API\Exception\ContainerArchiveInfoNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
7878
}
79-
if ((null === $contentType) === false && (500 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
79+
if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
8080
throw new \Docker\API\Exception\ContainerArchiveInfoInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
8181
}
8282
}

src/Endpoint/ContainerAttach.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getMethod(): string
137137

138138
public function getUri(): string
139139
{
140-
return \str_replace(['{id}'], [$this->id], '/containers/{id}/attach');
140+
return str_replace(['{id}'], [$this->id], '/containers/{id}/attach');
141141
}
142142

143143
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
@@ -181,7 +181,7 @@ protected function transformResponseBody(string $body, int $status, \Symfony\Com
181181
}
182182
if (400 === $status) {
183183
}
184-
if ((null === $contentType) === false && (404 === $status && false !== \mb_strpos($contentType, 'application/json'))) {
184+
if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
185185
throw new \Docker\API\Exception\ContainerAttachNotFoundException();
186186
}
187187
if (500 === $status) {

0 commit comments

Comments
 (0)