Skip to content
This repository was archived by the owner on Oct 26, 2019. It is now read-only.

Commit 2ecfec0

Browse files
committed
Add endpoints
1 parent a7781fa commit 2ecfec0

File tree

137 files changed

+9841
-6360
lines changed

Some content is hidden

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

137 files changed

+9841
-6360
lines changed

src/Endpoint/BuildPrune.php

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* This file has been auto generated by Jane,
7+
*
8+
* Do no edit it directly.
9+
*/
10+
11+
namespace Docker\API\Endpoint;
12+
13+
class BuildPrune extends \Jane\OpenApiRuntime\Client\BaseEndpoint
14+
{
15+
public function getMethod(): string
16+
{
17+
return 'POST';
18+
}
19+
20+
public function getUri(): string
21+
{
22+
return '/build/prune';
23+
}
24+
25+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null)
26+
{
27+
return [[], null];
28+
}
29+
30+
/**
31+
* {@inheritdoc}
32+
*
33+
* @throws \Docker\API\Exception\BuildPruneInternalServerErrorException
34+
*
35+
* @return null|\Docker\API\Model\BuildPrunePostResponse200
36+
*/
37+
public function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer)
38+
{
39+
if (200 === $status) {
40+
return $serializer->deserialize($body, 'Docker\\API\\Model\\BuildPrunePostResponse200', 'json');
41+
}
42+
if (500 === $status) {
43+
throw new \Docker\API\Exception\BuildPruneInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
44+
}
45+
}
46+
47+
public function getExtraHeaders(): array
48+
{
49+
return ['Accept' => ['application/json']];
50+
}
51+
}

src/Endpoint/ConfigCreate.php

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* This file has been auto generated by Jane,
7+
*
8+
* Do no edit it directly.
9+
*/
10+
11+
namespace Docker\API\Endpoint;
12+
13+
class ConfigCreate extends \Jane\OpenApiRuntime\Client\BaseEndpoint
14+
{
15+
/**
16+
* @param \Docker\API\Model\ConfigsCreatePostBody $body
17+
*/
18+
public function __construct(\Docker\API\Model\ConfigsCreatePostBody $body)
19+
{
20+
$this->body = $body;
21+
}
22+
23+
public function getMethod(): string
24+
{
25+
return 'POST';
26+
}
27+
28+
public function getUri(): string
29+
{
30+
return '/configs/create';
31+
}
32+
33+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null)
34+
{
35+
return $this->getSerializedBody($serializer);
36+
}
37+
38+
/**
39+
* {@inheritdoc}
40+
*
41+
* @throws \Docker\API\Exception\ConfigCreateConflictException
42+
* @throws \Docker\API\Exception\ConfigCreateInternalServerErrorException
43+
* @throws \Docker\API\Exception\ConfigCreateServiceUnavailableException
44+
*
45+
* @return null|\Docker\API\Model\ConfigsCreatePostResponse201
46+
*/
47+
public function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer)
48+
{
49+
if (201 === $status) {
50+
return $serializer->deserialize($body, 'Docker\\API\\Model\\ConfigsCreatePostResponse201', 'json');
51+
}
52+
if (409 === $status) {
53+
throw new \Docker\API\Exception\ConfigCreateConflictException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
54+
}
55+
if (500 === $status) {
56+
throw new \Docker\API\Exception\ConfigCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
57+
}
58+
if (503 === $status) {
59+
throw new \Docker\API\Exception\ConfigCreateServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
60+
}
61+
}
62+
63+
public function getExtraHeaders(): array
64+
{
65+
return ['Accept' => ['application/json']];
66+
}
67+
}

src/Endpoint/ConfigDelete.php

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* This file has been auto generated by Jane,
7+
*
8+
* Do no edit it directly.
9+
*/
10+
11+
namespace Docker\API\Endpoint;
12+
13+
class ConfigDelete extends \Jane\OpenApiRuntime\Client\BaseEndpoint
14+
{
15+
protected $id;
16+
17+
/**
18+
* @param string $id ID of the config
19+
*/
20+
public function __construct(string $id)
21+
{
22+
$this->id = $id;
23+
}
24+
25+
public function getMethod(): string
26+
{
27+
return 'DELETE';
28+
}
29+
30+
public function getUri(): string
31+
{
32+
return str_replace(['{id}'], [$this->id], '/configs/{id}');
33+
}
34+
35+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null)
36+
{
37+
return [[], null];
38+
}
39+
40+
/**
41+
* {@inheritdoc}
42+
*
43+
* @throws \Docker\API\Exception\ConfigDeleteNotFoundException
44+
* @throws \Docker\API\Exception\ConfigDeleteInternalServerErrorException
45+
* @throws \Docker\API\Exception\ConfigDeleteServiceUnavailableException
46+
*/
47+
public function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer)
48+
{
49+
if (204 === $status) {
50+
return null;
51+
}
52+
if (404 === $status) {
53+
throw new \Docker\API\Exception\ConfigDeleteNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
54+
}
55+
if (500 === $status) {
56+
throw new \Docker\API\Exception\ConfigDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
57+
}
58+
if (503 === $status) {
59+
throw new \Docker\API\Exception\ConfigDeleteServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
60+
}
61+
}
62+
63+
public function getExtraHeaders(): array
64+
{
65+
return ['Accept' => ['application/json']];
66+
}
67+
}

src/Endpoint/ConfigInspect.php

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* This file has been auto generated by Jane,
7+
*
8+
* Do no edit it directly.
9+
*/
10+
11+
namespace Docker\API\Endpoint;
12+
13+
class ConfigInspect extends \Jane\OpenApiRuntime\Client\BaseEndpoint
14+
{
15+
protected $id;
16+
17+
/**
18+
* @param string $id ID of the config
19+
*/
20+
public function __construct(string $id)
21+
{
22+
$this->id = $id;
23+
}
24+
25+
public function getMethod(): string
26+
{
27+
return 'GET';
28+
}
29+
30+
public function getUri(): string
31+
{
32+
return str_replace(['{id}'], [$this->id], '/configs/{id}');
33+
}
34+
35+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null)
36+
{
37+
return [[], null];
38+
}
39+
40+
/**
41+
* {@inheritdoc}
42+
*
43+
* @throws \Docker\API\Exception\ConfigInspectNotFoundException
44+
* @throws \Docker\API\Exception\ConfigInspectInternalServerErrorException
45+
* @throws \Docker\API\Exception\ConfigInspectServiceUnavailableException
46+
*
47+
* @return null|\Docker\API\Model\Config
48+
*/
49+
public function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer)
50+
{
51+
if (200 === $status) {
52+
return $serializer->deserialize($body, 'Docker\\API\\Model\\Config', 'json');
53+
}
54+
if (404 === $status) {
55+
throw new \Docker\API\Exception\ConfigInspectNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
56+
}
57+
if (500 === $status) {
58+
throw new \Docker\API\Exception\ConfigInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
59+
}
60+
if (503 === $status) {
61+
throw new \Docker\API\Exception\ConfigInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
62+
}
63+
}
64+
65+
public function getExtraHeaders(): array
66+
{
67+
return ['Accept' => ['application/json']];
68+
}
69+
}

src/Endpoint/ConfigList.php

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* This file has been auto generated by Jane,
7+
*
8+
* Do no edit it directly.
9+
*/
10+
11+
namespace Docker\API\Endpoint;
12+
13+
class ConfigList extends \Jane\OpenApiRuntime\Client\BaseEndpoint
14+
{
15+
/**
16+
* @param array $queryParameters {
17+
*
18+
* @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters:
19+
20+
- `id=<config id>`
21+
- `label=<key> or label=<key>=value`
22+
- `name=<config name>`
23+
- `names=<config name>`
24+
25+
* }
26+
*/
27+
public function __construct(array $queryParameters = [])
28+
{
29+
$this->queryParameters = $queryParameters;
30+
}
31+
32+
public function getMethod(): string
33+
{
34+
return 'GET';
35+
}
36+
37+
public function getUri(): string
38+
{
39+
return '/configs';
40+
}
41+
42+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null)
43+
{
44+
return [[], null];
45+
}
46+
47+
/**
48+
* {@inheritdoc}
49+
*
50+
* @throws \Docker\API\Exception\ConfigListInternalServerErrorException
51+
* @throws \Docker\API\Exception\ConfigListServiceUnavailableException
52+
*
53+
* @return null|\Docker\API\Model\Config[]
54+
*/
55+
public function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer)
56+
{
57+
if (200 === $status) {
58+
return $serializer->deserialize($body, 'Docker\\API\\Model\\Config[]', 'json');
59+
}
60+
if (500 === $status) {
61+
throw new \Docker\API\Exception\ConfigListInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
62+
}
63+
if (503 === $status) {
64+
throw new \Docker\API\Exception\ConfigListServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
65+
}
66+
}
67+
68+
public function getExtraHeaders(): array
69+
{
70+
return ['Accept' => ['application/json']];
71+
}
72+
73+
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
74+
{
75+
$optionsResolver = parent::getQueryOptionsResolver();
76+
$optionsResolver->setDefined(['filters']);
77+
$optionsResolver->setRequired([]);
78+
$optionsResolver->setDefaults([]);
79+
$optionsResolver->setAllowedTypes('filters', ['string']);
80+
81+
return $optionsResolver;
82+
}
83+
}

0 commit comments

Comments
 (0)