Skip to content

Commit

Permalink
Update API generated code (last update for Docker Engine API 1.41)
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioheleno committed Oct 9, 2023
1 parent e306d1a commit 0983de5
Show file tree
Hide file tree
Showing 40 changed files with 200 additions and 221 deletions.
91 changes: 35 additions & 56 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public function containerList(array $queryParameters = [], string $fetch = self:
}

/**
* @param \Docker\API\Model\ContainersCreatePostBody|null $requestBody
* @param array $queryParameters {
* @param array $queryParameters {
*
* @var string $name Assign the specified name to the container. Must match
* `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
Expand Down Expand Up @@ -356,9 +355,8 @@ public function containerKill(string $id, array $queryParameters = [], string $f
* Change various configuration options of a container without having to
* recreate it.
*
* @param string $id ID or name of the container
* @param \Docker\API\Model\ContainersIdUpdatePostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param string $id ID or name of the container
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Docker\API\Exception\ContainerUpdateNotFoundException
* @throws \Docker\API\Exception\ContainerUpdateInternalServerErrorException
Expand Down Expand Up @@ -1083,8 +1081,7 @@ public function imagePrune(array $queryParameters = [], string $fetch = self::FE
* Validate credentials for a registry and, if available, get an identity
* token for accessing the registry without password.
*
* @param \Docker\API\Model\AuthConfig|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Docker\API\Exception\SystemAuthInternalServerErrorException
*
Expand Down Expand Up @@ -1140,8 +1137,7 @@ public function systemPingHead(string $fetch = self::FETCH_OBJECT)
}

/**
* @param \Docker\API\Model\ContainerConfig|null $requestBody
* @param array $queryParameters {
* @param array $queryParameters {
*
* @var string $container The ID or name of the container to commit
* @var string $repo Repository name for the created image
Expand Down Expand Up @@ -1323,9 +1319,8 @@ public function imageLoad($requestBody = null, array $queryParameters = [], stri
/**
* Run a command inside a running container.
*
* @param string $id ID or name of container
* @param \Docker\API\Model\ContainersIdExecPostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param string $id ID or name of container
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Docker\API\Exception\ContainerExecNotFoundException
* @throws \Docker\API\Exception\ContainerExecConflictException
Expand All @@ -1343,9 +1338,8 @@ public function containerExec(string $id, Model\ContainersIdExecPostBody $reques
* returns immediately after starting the command. Otherwise, it sets up an
* interactive session with the command.
*
* @param string $id Exec instance ID
* @param \Docker\API\Model\ExecIdStartPostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param string $id Exec instance ID
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Psr\Http\Message\ResponseInterface|null
*/
Expand Down Expand Up @@ -1422,8 +1416,7 @@ public function volumeList(array $queryParameters = [], string $fetch = self::FE
}

/**
* @param \Docker\API\Model\VolumesCreatePostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Docker\API\Exception\VolumeCreateInternalServerErrorException
*
Expand Down Expand Up @@ -1568,8 +1561,7 @@ public function networkInspect(string $id, array $queryParameters = [], string $
}

/**
* @param \Docker\API\Model\NetworksCreatePostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Docker\API\Exception\NetworkCreateForbiddenException
* @throws \Docker\API\Exception\NetworkCreateNotFoundException
Expand All @@ -1583,10 +1575,9 @@ public function networkCreate(Model\NetworksCreatePostBody $requestBody = null,
}

/**
* @param string $id Network ID or name
* @param \Docker\API\Model\NetworksIdConnectPostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param array $accept Accept content header application/json|text/plain
* @param string $id Network ID or name
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param array $accept Accept content header application/json|text/plain
*
* @throws \Docker\API\Exception\NetworkConnectForbiddenException
* @throws \Docker\API\Exception\NetworkConnectNotFoundException
Expand All @@ -1600,10 +1591,9 @@ public function networkConnect(string $id, Model\NetworksIdConnectPostBody $requ
}

/**
* @param string $id Network ID or name
* @param \Docker\API\Model\NetworksIdDisconnectPostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param array $accept Accept content header application/json|text/plain
* @param string $id Network ID or name
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param array $accept Accept content header application/json|text/plain
*
* @throws \Docker\API\Exception\NetworkDisconnectForbiddenException
* @throws \Docker\API\Exception\NetworkDisconnectNotFoundException
Expand Down Expand Up @@ -1954,9 +1944,8 @@ public function nodeInspect(string $id, string $fetch = self::FETCH_OBJECT, arra
}

/**
* @param string $id The ID of the node
* @param \Docker\API\Model\NodeSpec|null $requestBody
* @param array $queryParameters {
* @param string $id The ID of the node
* @param array $queryParameters {
*
* @var int $version The version number of the node object being updated. This is required
* to avoid conflicting writes.
Expand Down Expand Up @@ -1994,9 +1983,8 @@ public function swarmInspect(string $fetch = self::FETCH_OBJECT, array $accept =
}

/**
* @param \Docker\API\Model\SwarmInitPostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param array $accept Accept content header application/json|text/plain
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param array $accept Accept content header application/json|text/plain
*
* @throws \Docker\API\Exception\SwarmInitBadRequestException
* @throws \Docker\API\Exception\SwarmInitInternalServerErrorException
Expand All @@ -2010,9 +1998,8 @@ public function swarmInit(Model\SwarmInitPostBody $requestBody = null, string $f
}

/**
* @param \Docker\API\Model\SwarmJoinPostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param array $accept Accept content header application/json|text/plain
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param array $accept Accept content header application/json|text/plain
*
* @throws \Docker\API\Exception\SwarmJoinBadRequestException
* @throws \Docker\API\Exception\SwarmJoinInternalServerErrorException
Expand Down Expand Up @@ -2047,8 +2034,7 @@ public function swarmLeave(array $queryParameters = [], string $fetch = self::FE
}

/**
* @param \Docker\API\Model\SwarmSpec|null $requestBody
* @param array $queryParameters {
* @param array $queryParameters {
*
* @var int $version The version number of the swarm object being updated. This is
* required to avoid conflicting writes.
Expand Down Expand Up @@ -2086,8 +2072,7 @@ public function swarmUnlockkey(string $fetch = self::FETCH_OBJECT, array $accept
}

/**
* @param \Docker\API\Model\SwarmUnlockPostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Docker\API\Exception\SwarmUnlockInternalServerErrorException
* @throws \Docker\API\Exception\SwarmUnlockServiceUnavailableException
Expand Down Expand Up @@ -2129,8 +2114,7 @@ public function serviceList(array $queryParameters = [], string $fetch = self::F
}

/**
* @param \Docker\API\Model\ServicesCreatePostBody|null $requestBody
* @param array $headerParameters {
* @param array $headerParameters {
*
* @var string $X-Registry-Auth A base64url-encoded auth configuration for pulling from private
* registries.
Expand Down Expand Up @@ -2193,9 +2177,8 @@ public function serviceInspect(string $id, array $queryParameters = [], string $
}

/**
* @param string $id ID or name of service
* @param \Docker\API\Model\ServicesIdUpdatePostBody|null $requestBody
* @param array $queryParameters {
* @param string $id ID or name of service
* @param array $queryParameters {
*
* @var int $version The version number of the service object being updated. This is
* required to avoid conflicting writes.
Expand Down Expand Up @@ -2376,8 +2359,7 @@ public function secretList(array $queryParameters = [], string $fetch = self::FE
}

/**
* @param \Docker\API\Model\SecretsCreatePostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Docker\API\Exception\SecretCreateConflictException
* @throws \Docker\API\Exception\SecretCreateInternalServerErrorException
Expand Down Expand Up @@ -2421,9 +2403,8 @@ public function secretInspect(string $id, string $fetch = self::FETCH_OBJECT)
}

/**
* @param string $id The ID or name of the secret
* @param \Docker\API\Model\SecretSpec|null $requestBody
* @param array $queryParameters {
* @param string $id The ID or name of the secret
* @param array $queryParameters {
*
* @var int $version The version number of the secret object being updated. This is
* required to avoid conflicting writes.
Expand Down Expand Up @@ -2473,8 +2454,7 @@ public function configList(array $queryParameters = [], string $fetch = self::FE
}

/**
* @param \Docker\API\Model\ConfigsCreatePostBody|null $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @throws \Docker\API\Exception\ConfigCreateConflictException
* @throws \Docker\API\Exception\ConfigCreateInternalServerErrorException
Expand Down Expand Up @@ -2518,9 +2498,8 @@ public function configInspect(string $id, string $fetch = self::FETCH_OBJECT)
}

/**
* @param string $id The ID or name of the config
* @param \Docker\API\Model\ConfigSpec|null $requestBody
* @param array $queryParameters {
* @param string $id The ID or name of the config
* @param array $queryParameters {
*
* @var int $version The version number of the config object being updated. This is
* required to avoid conflicting writes.
Expand Down Expand Up @@ -2573,7 +2552,7 @@ public static function create($httpClient = null, array $additionalPlugins = [],
if (null === $httpClient) {
$httpClient = \Http\Discovery\Psr18ClientDiscovery::find();
$plugins = [];
$uri = \Http\Discovery\Psr17FactoryDiscovery::findUrlFactory()->createUri('/v1.41');
$uri = \Http\Discovery\Psr17FactoryDiscovery::findUriFactory()->createUri('/v1.41');
$plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri);
if (\count($additionalPlugins) > 0) {
$plugins = array_merge($plugins, $additionalPlugins);
Expand Down
6 changes: 3 additions & 3 deletions src/Model/ConfigSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function isInitialized($property): bool
/**
* User-defined key/value metadata.
*
* @var string[]|null
* @var array<string, string>|null
*/
protected $labels;
/**
Expand Down Expand Up @@ -63,7 +63,7 @@ public function setName(?string $name): self
/**
* User-defined key/value metadata.
*
* @return string[]|null
* @return array<string, string>|null
*/
public function getLabels(): ?iterable
{
Expand All @@ -73,7 +73,7 @@ public function getLabels(): ?iterable
/**
* User-defined key/value metadata.
*
* @param string[]|null $labels
* @param array<string, string>|null $labels
*/
public function setLabels(?iterable $labels): self
{
Expand Down
6 changes: 3 additions & 3 deletions src/Model/ConfigsCreatePostBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function isInitialized($property): bool
/**
* User-defined key/value metadata.
*
* @var string[]|null
* @var array<string, string>|null
*/
protected $labels;
/**
Expand Down Expand Up @@ -63,7 +63,7 @@ public function setName(?string $name): self
/**
* User-defined key/value metadata.
*
* @return string[]|null
* @return array<string, string>|null
*/
public function getLabels(): ?iterable
{
Expand All @@ -73,7 +73,7 @@ public function getLabels(): ?iterable
/**
* User-defined key/value metadata.
*
* @param string[]|null $labels
* @param array<string, string>|null $labels
*/
public function setLabels(?iterable $labels): self
{
Expand Down
18 changes: 9 additions & 9 deletions src/Model/ContainerConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function isInitialized($property): bool
*
* `{"<port>/<tcp|udp|sctp>": {}}`
*
* @var ContainerConfigExposedPortsItem[]|null
* @var array<string, ContainerConfigExposedPortsItem>|null
*/
protected $exposedPorts;
/**
Expand Down Expand Up @@ -113,7 +113,7 @@ public function isInitialized($property): bool
* An object mapping mount point paths inside the container to empty
* objects.
*
* @var ContainerConfigVolumesItem[]|null
* @var array<string, ContainerConfigVolumesItem>|null
*/
protected $volumes;
/**
Expand Down Expand Up @@ -153,7 +153,7 @@ public function isInitialized($property): bool
/**
* User-defined key/value metadata.
*
* @var string[]|null
* @var array<string, string>|null
*/
protected $labels;
/**
Expand Down Expand Up @@ -294,7 +294,7 @@ public function setAttachStderr(?bool $attachStderr): self
*
* `{"<port>/<tcp|udp|sctp>": {}}`
*
* @return ContainerConfigExposedPortsItem[]|null
* @return array<string, ContainerConfigExposedPortsItem>|null
*/
public function getExposedPorts(): ?iterable
{
Expand All @@ -306,7 +306,7 @@ public function getExposedPorts(): ?iterable
*
* `{"<port>/<tcp|udp|sctp>": {}}`
*
* @param ContainerConfigExposedPortsItem[]|null $exposedPorts
* @param array<string, ContainerConfigExposedPortsItem>|null $exposedPorts
*/
public function setExposedPorts(?iterable $exposedPorts): self
{
Expand Down Expand Up @@ -484,7 +484,7 @@ public function setImage(?string $image): self
* An object mapping mount point paths inside the container to empty
* objects.
*
* @return ContainerConfigVolumesItem[]|null
* @return array<string, ContainerConfigVolumesItem>|null
*/
public function getVolumes(): ?iterable
{
Expand All @@ -495,7 +495,7 @@ public function getVolumes(): ?iterable
* An object mapping mount point paths inside the container to empty
* objects.
*
* @param ContainerConfigVolumesItem[]|null $volumes
* @param array<string, ContainerConfigVolumesItem>|null $volumes
*/
public function setVolumes(?iterable $volumes): self
{
Expand Down Expand Up @@ -619,7 +619,7 @@ public function setOnBuild(?array $onBuild): self
/**
* User-defined key/value metadata.
*
* @return string[]|null
* @return array<string, string>|null
*/
public function getLabels(): ?iterable
{
Expand All @@ -629,7 +629,7 @@ public function getLabels(): ?iterable
/**
* User-defined key/value metadata.
*
* @param string[]|null $labels
* @param array<string, string>|null $labels
*/
public function setLabels(?iterable $labels): self
{
Expand Down
Loading

0 comments on commit 0983de5

Please sign in to comment.