diff --git a/docker-swagger.yaml b/docker-swagger.yaml index 5d77c604..a2991d9a 100644 --- a/docker-swagger.yaml +++ b/docker-swagger.yaml @@ -19,10 +19,10 @@ produces: consumes: - "application/json" - "text/plain" -basePath: "/v1.36" +basePath: "/v1.37" info: title: "Docker Engine API" - version: "1.36" + version: "1.37" x-logo: url: "https://docs.docker.com/images/logo-docker-main.png" description: | @@ -49,7 +49,7 @@ info: the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. - If you omit the version-prefix, the current version of the API (v1.36) is used. + If you omit the version-prefix, the current version of the API (v1.37) is used. For example, calling `/info` is the same as calling `/v1.36/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. @@ -167,7 +167,7 @@ definitions: Type: type: "string" x-nullable: false - enum: ["tcp", "udp"] + enum: ["tcp", "udp", "sctp"] example: PrivatePort: 8080 PublicPort: 80 @@ -443,6 +443,10 @@ definitions: OomKillDisable: description: "Disable OOM Killer for the container." type: "boolean" + Init: + description: "Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used." + type: "boolean" + x-nullable: true PidsLimit: description: "Tune a container's pids limit. Set -1 for unlimited." type: "integer" @@ -797,7 +801,7 @@ definitions: description: | An object mapping ports to an empty object in the form: - `{"/": {}}` + `{"/": {}}` type: "object" additionalProperties: type: "object" @@ -1062,8 +1066,8 @@ definitions: container's port-number and protocol as key in the format `/`, for example, `80/udp`. - If a container's port is mapped for both `tcp` and `udp`, two separate - entries are added to the mapping table. + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. type: "object" additionalProperties: type: "array" @@ -2800,6 +2804,8 @@ definitions: - "shutdown" - "failed" - "rejected" + - "remove" + - "orphaned" Task: type: "object" @@ -3040,6 +3046,7 @@ definitions: enum: - "tcp" - "udp" + - "sctp" TargetPort: description: "The port inside the container." type: "integer" @@ -3331,6 +3338,13 @@ definitions: Driver: description: "Name of the secrets driver used to fetch the secret's value from an external secret store" $ref: "#/definitions/Driver" + Templating: + description: | + Templating driver, if applicable + + Templating controls whether and how to evaluate the config payload as + a template. If no driver is set, no templating is used. + $ref: "#/definitions/Driver" Secret: type: "object" @@ -3367,6 +3381,13 @@ definitions: Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-3.2)) config data. type: "string" + Templating: + description: | + Templating driver, if applicable + + Templating controls whether and how to evaluate the config payload as + a template. If no driver is set, no templating is used. + $ref: "#/definitions/Driver" Config: type: "object" @@ -4640,7 +4661,7 @@ paths: AppArmorProfile: type: "string" ExecIDs: - type: "string" + type: "array" HostConfig: $ref: "#/definitions/HostConfig" GraphDriver: @@ -5349,6 +5370,13 @@ paths: examples: application/json: message: "No such container: c2ada9df5af8" + 409: + description: "container is not running" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" 500: description: "server error" schema: @@ -6159,7 +6187,18 @@ paths: type: "integer" - name: "buildargs" in: "query" - description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)" + description: > + JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker + uses the buildargs as the environment context for commands run via the `Dockerfile` RUN + instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for + passing secret values. + + + For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the + the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. + + + [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) type: "string" - name: "shmsize" in: "query" diff --git a/src/Client.php b/src/Client.php index 322a543a..945f9e09 100644 --- a/src/Client.php +++ b/src/Client.php @@ -293,6 +293,7 @@ public function containerRestart(string $id, array $queryParameters = [], string * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * * @throws \Docker\API\Exception\ContainerKillNotFoundException + * @throws \Docker\API\Exception\ContainerKillConflictException * @throws \Docker\API\Exception\ContainerKillInternalServerErrorException * * @return null|\Psr\Http\Message\ResponseInterface @@ -683,7 +684,8 @@ public function imageList(array $queryParameters = [], string $fetch = self::FET * @var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`). * @var int $cpuperiod the length of a CPU period in microseconds * @var int $cpuquota microseconds of CPU time that the container can get in a CPU period - * @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + * @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. + * @var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. * @var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)* * @var string $labels arbitrary key/value labels to set on the image, as a JSON map of string pairs @@ -2200,7 +2202,7 @@ public static function create($httpClient = null) if (null === $httpClient) { $httpClient = \Http\Discovery\HttpClientDiscovery::find(); $plugins = []; - $uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri('v1.36'); + $uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri('v1.37'); $plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri); $httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins); } diff --git a/src/ClientAsync.php b/src/ClientAsync.php index 8ae78372..8c4a1c38 100644 --- a/src/ClientAsync.php +++ b/src/ClientAsync.php @@ -293,6 +293,7 @@ public function containerRestart(string $id, array $queryParameters = [], string * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * * @throws \Docker\API\Exception\ContainerKillNotFoundException + * @throws \Docker\API\Exception\ContainerKillConflictException * @throws \Docker\API\Exception\ContainerKillInternalServerErrorException * * @return \Amp\Promise @@ -683,7 +684,8 @@ public function imageList(array $queryParameters = [], string $fetch = self::FET * @var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`). * @var int $cpuperiod the length of a CPU period in microseconds * @var int $cpuquota microseconds of CPU time that the container can get in a CPU period - * @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + * @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. + * @var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. * @var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)* * @var string $labels arbitrary key/value labels to set on the image, as a JSON map of string pairs diff --git a/src/Endpoint/ContainerKill.php b/src/Endpoint/ContainerKill.php index d2f6dd53..c6fa9f51 100644 --- a/src/Endpoint/ContainerKill.php +++ b/src/Endpoint/ContainerKill.php @@ -66,6 +66,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * {@inheritdoc} * * @throws \Docker\API\Exception\ContainerKillNotFoundException + * @throws \Docker\API\Exception\ContainerKillConflictException * @throws \Docker\API\Exception\ContainerKillInternalServerErrorException */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer) @@ -76,6 +77,9 @@ protected function transformResponseBody(string $body, int $status, \Symfony\Com if (404 === $status) { throw new \Docker\API\Exception\ContainerKillNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json')); } + if (409 === $status) { + throw new \Docker\API\Exception\ContainerKillConflictException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json')); + } if (500 === $status) { throw new \Docker\API\Exception\ContainerKillInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json')); } diff --git a/src/Endpoint/ImageBuild.php b/src/Endpoint/ImageBuild.php index c8311bea..34a543b3 100644 --- a/src/Endpoint/ImageBuild.php +++ b/src/Endpoint/ImageBuild.php @@ -41,7 +41,8 @@ class ImageBuild extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Ja * @var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`). * @var int $cpuperiod the length of a CPU period in microseconds * @var int $cpuquota microseconds of CPU time that the container can get in a CPU period - * @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + * @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. + * @var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. * @var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)* * @var string $labels arbitrary key/value labels to set on the image, as a JSON map of string pairs diff --git a/src/Exception/ContainerKillConflictException.php b/src/Exception/ContainerKillConflictException.php new file mode 100644 index 00000000..bb583f94 --- /dev/null +++ b/src/Exception/ContainerKillConflictException.php @@ -0,0 +1,27 @@ +errorResponse = $errorResponse; + } + + public function getErrorResponse() + { + return $this->errorResponse; + } +} diff --git a/src/Model/ConfigSpec.php b/src/Model/ConfigSpec.php index 088e9364..c60e9d5a 100644 --- a/src/Model/ConfigSpec.php +++ b/src/Model/ConfigSpec.php @@ -32,6 +32,12 @@ class ConfigSpec * @var string */ protected $data; + /** + * Driver represents a driver (network, logging, secrets). + * + * @var Driver + */ + protected $templating; /** * User-defined name of the config. @@ -108,4 +114,28 @@ public function setData(?string $data): self return $this; } + + /** + * Driver represents a driver (network, logging, secrets). + * + * @return Driver + */ + public function getTemplating(): ?Driver + { + return $this->templating; + } + + /** + * Driver represents a driver (network, logging, secrets). + * + * @param Driver $templating + * + * @return self + */ + public function setTemplating(?Driver $templating): self + { + $this->templating = $templating; + + return $this; + } } diff --git a/src/Model/ConfigsCreatePostBody.php b/src/Model/ConfigsCreatePostBody.php index b6a30b5b..d37795bc 100644 --- a/src/Model/ConfigsCreatePostBody.php +++ b/src/Model/ConfigsCreatePostBody.php @@ -32,6 +32,12 @@ class ConfigsCreatePostBody * @var string */ protected $data; + /** + * Driver represents a driver (network, logging, secrets). + * + * @var Driver + */ + protected $templating; /** * User-defined name of the config. @@ -108,4 +114,28 @@ public function setData(?string $data): self return $this; } + + /** + * Driver represents a driver (network, logging, secrets). + * + * @return Driver + */ + public function getTemplating(): ?Driver + { + return $this->templating; + } + + /** + * Driver represents a driver (network, logging, secrets). + * + * @param Driver $templating + * + * @return self + */ + public function setTemplating(?Driver $templating): self + { + $this->templating = $templating; + + return $this; + } } diff --git a/src/Model/ContainerConfig.php b/src/Model/ContainerConfig.php index 38d9ca5b..f3e5d23e 100644 --- a/src/Model/ContainerConfig.php +++ b/src/Model/ContainerConfig.php @@ -51,7 +51,7 @@ class ContainerConfig /** * An object mapping ports to an empty object in the form:. - `{"/": {}}` + `{"/": {}}` * * @var mixed[] @@ -316,7 +316,7 @@ public function setAttachStderr(?bool $attachStderr): self /** * An object mapping ports to an empty object in the form:. - `{"/": {}}` + `{"/": {}}` * * @return mixed[] @@ -329,7 +329,7 @@ public function getExposedPorts(): ?\ArrayObject /** * An object mapping ports to an empty object in the form:. - `{"/": {}}` + `{"/": {}}` * * @param mixed[] $exposedPorts diff --git a/src/Model/ContainersCreatePostBody.php b/src/Model/ContainersCreatePostBody.php index 8bcca83c..3961dd2b 100644 --- a/src/Model/ContainersCreatePostBody.php +++ b/src/Model/ContainersCreatePostBody.php @@ -51,7 +51,7 @@ class ContainersCreatePostBody /** * An object mapping ports to an empty object in the form:. - `{"/": {}}` + `{"/": {}}` * * @var mixed[] @@ -328,7 +328,7 @@ public function setAttachStderr(?bool $attachStderr): self /** * An object mapping ports to an empty object in the form:. - `{"/": {}}` + `{"/": {}}` * * @return mixed[] @@ -341,7 +341,7 @@ public function getExposedPorts(): ?\ArrayObject /** * An object mapping ports to an empty object in the form:. - `{"/": {}}` + `{"/": {}}` * * @param mixed[] $exposedPorts diff --git a/src/Model/ContainersIdJsonGetResponse200.php b/src/Model/ContainersIdJsonGetResponse200.php index 465e3c8f..f52916f1 100644 --- a/src/Model/ContainersIdJsonGetResponse200.php +++ b/src/Model/ContainersIdJsonGetResponse200.php @@ -95,7 +95,7 @@ class ContainersIdJsonGetResponse200 */ protected $appArmorProfile; /** - * @var string + * @var mixed[] */ protected $execIDs; /** @@ -508,19 +508,19 @@ public function setAppArmorProfile(?string $appArmorProfile): self } /** - * @return string + * @return mixed[] */ - public function getExecIDs(): ?string + public function getExecIDs(): ?array { return $this->execIDs; } /** - * @param string $execIDs + * @param mixed[] $execIDs * * @return self */ - public function setExecIDs(?string $execIDs): self + public function setExecIDs(?array $execIDs): self { $this->execIDs = $execIDs; diff --git a/src/Model/ContainersIdUpdatePostBody.php b/src/Model/ContainersIdUpdatePostBody.php index 6f04d9b6..ff5e3f7c 100644 --- a/src/Model/ContainersIdUpdatePostBody.php +++ b/src/Model/ContainersIdUpdatePostBody.php @@ -156,6 +156,12 @@ class ContainersIdUpdatePostBody * @var bool */ protected $oomKillDisable; + /** + * Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + * + * @var bool + */ + protected $init; /** * Tune a container's pids limit. Set -1 for unlimited. * @@ -784,6 +790,30 @@ public function setOomKillDisable(?bool $oomKillDisable): self return $this; } + /** + * Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + * + * @return bool + */ + public function getInit(): ?bool + { + return $this->init; + } + + /** + * Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + * + * @param bool $init + * + * @return self + */ + public function setInit(?bool $init): self + { + $this->init = $init; + + return $this; + } + /** * Tune a container's pids limit. Set -1 for unlimited. * diff --git a/src/Model/HostConfig.php b/src/Model/HostConfig.php index 32414fca..8becb235 100644 --- a/src/Model/HostConfig.php +++ b/src/Model/HostConfig.php @@ -156,6 +156,12 @@ class HostConfig * @var bool */ protected $oomKillDisable; + /** + * Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + * + * @var bool + */ + protected $init; /** * Tune a container's pids limit. Set -1 for unlimited. * @@ -233,8 +239,8 @@ class HostConfig container's port-number and protocol as key in the format `/`, for example, `80/udp`. - If a container's port is mapped for both `tcp` and `udp`, two separate - entries are added to the mapping table. + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. * * @var PortBinding[][] @@ -1022,6 +1028,30 @@ public function setOomKillDisable(?bool $oomKillDisable): self return $this; } + /** + * Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + * + * @return bool + */ + public function getInit(): ?bool + { + return $this->init; + } + + /** + * Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + * + * @param bool $init + * + * @return self + */ + public function setInit(?bool $init): self + { + $this->init = $init; + + return $this; + } + /** * Tune a container's pids limit. Set -1 for unlimited. * @@ -1291,8 +1321,8 @@ public function setNetworkMode(?string $networkMode): self container's port-number and protocol as key in the format `/`, for example, `80/udp`. - If a container's port is mapped for both `tcp` and `udp`, two separate - entries are added to the mapping table. + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. * * @return PortBinding[][] @@ -1307,8 +1337,8 @@ public function getPortBindings(): ?\ArrayObject container's port-number and protocol as key in the format `/`, for example, `80/udp`. - If a container's port is mapped for both `tcp` and `udp`, two separate - entries are added to the mapping table. + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. * * @param PortBinding[][] $portBindings diff --git a/src/Model/NetworkSettings.php b/src/Model/NetworkSettings.php index 37b71730..ce6d4115 100644 --- a/src/Model/NetworkSettings.php +++ b/src/Model/NetworkSettings.php @@ -47,8 +47,8 @@ class NetworkSettings container's port-number and protocol as key in the format `/`, for example, `80/udp`. - If a container's port is mapped for both `tcp` and `udp`, two separate - entries are added to the mapping table. + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. * * @var PortBinding[][] @@ -320,8 +320,8 @@ public function setLinkLocalIPv6PrefixLen(?int $linkLocalIPv6PrefixLen): self container's port-number and protocol as key in the format `/`, for example, `80/udp`. - If a container's port is mapped for both `tcp` and `udp`, two separate - entries are added to the mapping table. + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. * * @return PortBinding[][] @@ -336,8 +336,8 @@ public function getPorts(): ?\ArrayObject container's port-number and protocol as key in the format `/`, for example, `80/udp`. - If a container's port is mapped for both `tcp` and `udp`, two separate - entries are added to the mapping table. + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. * * @param PortBinding[][] $ports diff --git a/src/Model/Resources.php b/src/Model/Resources.php index 2568c5c2..e8e4e86e 100644 --- a/src/Model/Resources.php +++ b/src/Model/Resources.php @@ -156,6 +156,12 @@ class Resources * @var bool */ protected $oomKillDisable; + /** + * Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + * + * @var bool + */ + protected $init; /** * Tune a container's pids limit. Set -1 for unlimited. * @@ -775,6 +781,30 @@ public function setOomKillDisable(?bool $oomKillDisable): self return $this; } + /** + * Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + * + * @return bool + */ + public function getInit(): ?bool + { + return $this->init; + } + + /** + * Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + * + * @param bool $init + * + * @return self + */ + public function setInit(?bool $init): self + { + $this->init = $init; + + return $this; + } + /** * Tune a container's pids limit. Set -1 for unlimited. * diff --git a/src/Model/SecretSpec.php b/src/Model/SecretSpec.php index 8fb8941f..f63903ba 100644 --- a/src/Model/SecretSpec.php +++ b/src/Model/SecretSpec.php @@ -41,6 +41,12 @@ class SecretSpec * @var Driver */ protected $driver; + /** + * Driver represents a driver (network, logging, secrets). + * + * @var Driver + */ + protected $templating; /** * User-defined name of the secret. @@ -147,4 +153,28 @@ public function setDriver(?Driver $driver): self return $this; } + + /** + * Driver represents a driver (network, logging, secrets). + * + * @return Driver + */ + public function getTemplating(): ?Driver + { + return $this->templating; + } + + /** + * Driver represents a driver (network, logging, secrets). + * + * @param Driver $templating + * + * @return self + */ + public function setTemplating(?Driver $templating): self + { + $this->templating = $templating; + + return $this; + } } diff --git a/src/Model/SecretsCreatePostBody.php b/src/Model/SecretsCreatePostBody.php index 0f85b194..b7db1faa 100644 --- a/src/Model/SecretsCreatePostBody.php +++ b/src/Model/SecretsCreatePostBody.php @@ -41,6 +41,12 @@ class SecretsCreatePostBody * @var Driver */ protected $driver; + /** + * Driver represents a driver (network, logging, secrets). + * + * @var Driver + */ + protected $templating; /** * User-defined name of the secret. @@ -147,4 +153,28 @@ public function setDriver(?Driver $driver): self return $this; } + + /** + * Driver represents a driver (network, logging, secrets). + * + * @return Driver + */ + public function getTemplating(): ?Driver + { + return $this->templating; + } + + /** + * Driver represents a driver (network, logging, secrets). + * + * @param Driver $templating + * + * @return self + */ + public function setTemplating(?Driver $templating): self + { + $this->templating = $templating; + + return $this; + } } diff --git a/src/Model/SwarmJoinPostBody.php b/src/Model/SwarmJoinPostBody.php index fdf759f2..d046bcf8 100644 --- a/src/Model/SwarmJoinPostBody.php +++ b/src/Model/SwarmJoinPostBody.php @@ -40,7 +40,7 @@ class SwarmJoinPostBody /** * Addresses of manager nodes already participating in the swarm. * - * @var string + * @var array */ protected $remoteAddrs; /** @@ -139,9 +139,9 @@ public function setDataPathAddr(?string $dataPathAddr): self /** * Addresses of manager nodes already participating in the swarm. * - * @return string + * @return array */ - public function getRemoteAddrs(): ?string + public function getRemoteAddrs(): ?array { return $this->remoteAddrs; } @@ -149,11 +149,11 @@ public function getRemoteAddrs(): ?string /** * Addresses of manager nodes already participating in the swarm. * - * @param string $remoteAddrs + * @param array $remoteAddrs * * @return self */ - public function setRemoteAddrs(?string $remoteAddrs): self + public function setRemoteAddrs(?array $remoteAddrs): self { $this->remoteAddrs = $remoteAddrs; diff --git a/src/Model/TaskSpecResources.php b/src/Model/TaskSpecResources.php index a3f83e74..63852e9a 100644 --- a/src/Model/TaskSpecResources.php +++ b/src/Model/TaskSpecResources.php @@ -23,7 +23,7 @@ class TaskSpecResources * * @var ResourceObject */ - protected $reservation; + protected $reservations; /** * An object describing the resources which can be advertised by a node and requested by a task. @@ -54,21 +54,21 @@ public function setLimits(?ResourceObject $limits): self * * @return ResourceObject */ - public function getReservation(): ?ResourceObject + public function getReservations(): ?ResourceObject { - return $this->reservation; + return $this->reservations; } /** * An object describing the resources which can be advertised by a node and requested by a task. * - * @param ResourceObject $reservation + * @param ResourceObject $reservations * * @return self */ - public function setReservation(?ResourceObject $reservation): self + public function setReservations(?ResourceObject $reservations): self { - $this->reservation = $reservation; + $this->reservations = $reservations; return $this; } diff --git a/src/Normalizer/ConfigSpecNormalizer.php b/src/Normalizer/ConfigSpecNormalizer.php index f14a7010..dd837476 100644 --- a/src/Normalizer/ConfigSpecNormalizer.php +++ b/src/Normalizer/ConfigSpecNormalizer.php @@ -51,6 +51,9 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'Data') && $data->{'Data'} !== null) { $object->setData($data->{'Data'}); } + if (property_exists($data, 'Templating') && $data->{'Templating'} !== null) { + $object->setTemplating($this->denormalizer->denormalize($data->{'Templating'}, 'Docker\\API\\Model\\Driver', 'json', $context)); + } return $object; } @@ -71,6 +74,9 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getData()) { $data->{'Data'} = $object->getData(); } + if (null !== $object->getTemplating()) { + $data->{'Templating'} = $this->normalizer->normalize($object->getTemplating(), 'json', $context); + } return $data; } diff --git a/src/Normalizer/ConfigsCreatePostBodyNormalizer.php b/src/Normalizer/ConfigsCreatePostBodyNormalizer.php index 942db8a4..f94b8293 100644 --- a/src/Normalizer/ConfigsCreatePostBodyNormalizer.php +++ b/src/Normalizer/ConfigsCreatePostBodyNormalizer.php @@ -51,6 +51,9 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'Data') && $data->{'Data'} !== null) { $object->setData($data->{'Data'}); } + if (property_exists($data, 'Templating') && $data->{'Templating'} !== null) { + $object->setTemplating($this->denormalizer->denormalize($data->{'Templating'}, 'Docker\\API\\Model\\Driver', 'json', $context)); + } return $object; } @@ -71,6 +74,9 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getData()) { $data->{'Data'} = $object->getData(); } + if (null !== $object->getTemplating()) { + $data->{'Templating'} = $this->normalizer->normalize($object->getTemplating(), 'json', $context); + } return $data; } diff --git a/src/Normalizer/ContainersIdJsonGetResponse200Normalizer.php b/src/Normalizer/ContainersIdJsonGetResponse200Normalizer.php index 6c37d13c..1023aa96 100644 --- a/src/Normalizer/ContainersIdJsonGetResponse200Normalizer.php +++ b/src/Normalizer/ContainersIdJsonGetResponse200Normalizer.php @@ -94,7 +94,11 @@ public function denormalize($data, $class, $format = null, array $context = []) $object->setAppArmorProfile($data->{'AppArmorProfile'}); } if (property_exists($data, 'ExecIDs') && $data->{'ExecIDs'} !== null) { - $object->setExecIDs($data->{'ExecIDs'}); + $values_1 = []; + foreach ($data->{'ExecIDs'} as $value_1) { + $values_1[] = $value_1; + } + $object->setExecIDs($values_1); } if (property_exists($data, 'HostConfig') && $data->{'HostConfig'} !== null) { $object->setHostConfig($this->denormalizer->denormalize($data->{'HostConfig'}, 'Docker\\API\\Model\\HostConfig', 'json', $context)); @@ -109,11 +113,11 @@ public function denormalize($data, $class, $format = null, array $context = []) $object->setSizeRootFs($data->{'SizeRootFs'}); } if (property_exists($data, 'Mounts') && $data->{'Mounts'} !== null) { - $values_1 = []; - foreach ($data->{'Mounts'} as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, 'Docker\\API\\Model\\MountPoint', 'json', $context); + $values_2 = []; + foreach ($data->{'Mounts'} as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Docker\\API\\Model\\MountPoint', 'json', $context); } - $object->setMounts($values_1); + $object->setMounts($values_2); } if (property_exists($data, 'Config') && $data->{'Config'} !== null) { $object->setConfig($this->denormalizer->denormalize($data->{'Config'}, 'Docker\\API\\Model\\ContainerConfig', 'json', $context)); @@ -184,7 +188,11 @@ public function normalize($object, $format = null, array $context = []) $data->{'AppArmorProfile'} = $object->getAppArmorProfile(); } if (null !== $object->getExecIDs()) { - $data->{'ExecIDs'} = $object->getExecIDs(); + $values_1 = []; + foreach ($object->getExecIDs() as $value_1) { + $values_1[] = $value_1; + } + $data->{'ExecIDs'} = $values_1; } if (null !== $object->getHostConfig()) { $data->{'HostConfig'} = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); @@ -199,11 +207,11 @@ public function normalize($object, $format = null, array $context = []) $data->{'SizeRootFs'} = $object->getSizeRootFs(); } if (null !== $object->getMounts()) { - $values_1 = []; - foreach ($object->getMounts() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + $values_2 = []; + foreach ($object->getMounts() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - $data->{'Mounts'} = $values_1; + $data->{'Mounts'} = $values_2; } if (null !== $object->getConfig()) { $data->{'Config'} = $this->normalizer->normalize($object->getConfig(), 'json', $context); diff --git a/src/Normalizer/ContainersIdUpdatePostBodyNormalizer.php b/src/Normalizer/ContainersIdUpdatePostBodyNormalizer.php index 38ba58f7..2c91f332 100644 --- a/src/Normalizer/ContainersIdUpdatePostBodyNormalizer.php +++ b/src/Normalizer/ContainersIdUpdatePostBodyNormalizer.php @@ -138,6 +138,9 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'OomKillDisable') && $data->{'OomKillDisable'} !== null) { $object->setOomKillDisable($data->{'OomKillDisable'}); } + if (property_exists($data, 'Init') && $data->{'Init'} !== null) { + $object->setInit($data->{'Init'}); + } if (property_exists($data, 'PidsLimit') && $data->{'PidsLimit'} !== null) { $object->setPidsLimit($data->{'PidsLimit'}); } @@ -270,6 +273,9 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getOomKillDisable()) { $data->{'OomKillDisable'} = $object->getOomKillDisable(); } + if (null !== $object->getInit()) { + $data->{'Init'} = $object->getInit(); + } if (null !== $object->getPidsLimit()) { $data->{'PidsLimit'} = $object->getPidsLimit(); } diff --git a/src/Normalizer/HostConfigNormalizer.php b/src/Normalizer/HostConfigNormalizer.php index 52bdece6..a5e2de02 100644 --- a/src/Normalizer/HostConfigNormalizer.php +++ b/src/Normalizer/HostConfigNormalizer.php @@ -138,6 +138,9 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'OomKillDisable') && $data->{'OomKillDisable'} !== null) { $object->setOomKillDisable($data->{'OomKillDisable'}); } + if (property_exists($data, 'Init') && $data->{'Init'} !== null) { + $object->setInit($data->{'Init'}); + } if (property_exists($data, 'PidsLimit') && $data->{'PidsLimit'} !== null) { $object->setPidsLimit($data->{'PidsLimit'}); } @@ -444,6 +447,9 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getOomKillDisable()) { $data->{'OomKillDisable'} = $object->getOomKillDisable(); } + if (null !== $object->getInit()) { + $data->{'Init'} = $object->getInit(); + } if (null !== $object->getPidsLimit()) { $data->{'PidsLimit'} = $object->getPidsLimit(); } diff --git a/src/Normalizer/NetworkSettingsNormalizer.php b/src/Normalizer/NetworkSettingsNormalizer.php index 6d82a9e6..985e4f10 100644 --- a/src/Normalizer/NetworkSettingsNormalizer.php +++ b/src/Normalizer/NetworkSettingsNormalizer.php @@ -57,8 +57,11 @@ public function denormalize($data, $class, $format = null, array $context = []) $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($data->{'Ports'} as $key => $value) { $values_1 = []; - foreach ($value as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, 'Docker\\API\\Model\\PortBinding', 'json', $context); + if($value) + { + foreach ($value as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Docker\\API\\Model\\PortBinding', 'json', $context); + } } $values[$key] = $values_1; } diff --git a/src/Normalizer/ResourcesNormalizer.php b/src/Normalizer/ResourcesNormalizer.php index 5d706503..ade7c107 100644 --- a/src/Normalizer/ResourcesNormalizer.php +++ b/src/Normalizer/ResourcesNormalizer.php @@ -138,6 +138,9 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'OomKillDisable') && $data->{'OomKillDisable'} !== null) { $object->setOomKillDisable($data->{'OomKillDisable'}); } + if (property_exists($data, 'Init') && $data->{'Init'} !== null) { + $object->setInit($data->{'Init'}); + } if (property_exists($data, 'PidsLimit') && $data->{'PidsLimit'} !== null) { $object->setPidsLimit($data->{'PidsLimit'}); } @@ -267,6 +270,9 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getOomKillDisable()) { $data->{'OomKillDisable'} = $object->getOomKillDisable(); } + if (null !== $object->getInit()) { + $data->{'Init'} = $object->getInit(); + } if (null !== $object->getPidsLimit()) { $data->{'PidsLimit'} = $object->getPidsLimit(); } diff --git a/src/Normalizer/SecretSpecNormalizer.php b/src/Normalizer/SecretSpecNormalizer.php index 4cae5434..398896e6 100644 --- a/src/Normalizer/SecretSpecNormalizer.php +++ b/src/Normalizer/SecretSpecNormalizer.php @@ -54,6 +54,9 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'Driver') && $data->{'Driver'} !== null) { $object->setDriver($this->denormalizer->denormalize($data->{'Driver'}, 'Docker\\API\\Model\\Driver', 'json', $context)); } + if (property_exists($data, 'Templating') && $data->{'Templating'} !== null) { + $object->setTemplating($this->denormalizer->denormalize($data->{'Templating'}, 'Docker\\API\\Model\\Driver', 'json', $context)); + } return $object; } @@ -77,6 +80,9 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getDriver()) { $data->{'Driver'} = $this->normalizer->normalize($object->getDriver(), 'json', $context); } + if (null !== $object->getTemplating()) { + $data->{'Templating'} = $this->normalizer->normalize($object->getTemplating(), 'json', $context); + } return $data; } diff --git a/src/Normalizer/SecretsCreatePostBodyNormalizer.php b/src/Normalizer/SecretsCreatePostBodyNormalizer.php index 6b0a853f..f9b4e632 100644 --- a/src/Normalizer/SecretsCreatePostBodyNormalizer.php +++ b/src/Normalizer/SecretsCreatePostBodyNormalizer.php @@ -54,6 +54,9 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'Driver') && $data->{'Driver'} !== null) { $object->setDriver($this->denormalizer->denormalize($data->{'Driver'}, 'Docker\\API\\Model\\Driver', 'json', $context)); } + if (property_exists($data, 'Templating') && $data->{'Templating'} !== null) { + $object->setTemplating($this->denormalizer->denormalize($data->{'Templating'}, 'Docker\\API\\Model\\Driver', 'json', $context)); + } return $object; } @@ -77,6 +80,9 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getDriver()) { $data->{'Driver'} = $this->normalizer->normalize($object->getDriver(), 'json', $context); } + if (null !== $object->getTemplating()) { + $data->{'Templating'} = $this->normalizer->normalize($object->getTemplating(), 'json', $context); + } return $data; } diff --git a/src/Normalizer/TaskSpecResourcesNormalizer.php b/src/Normalizer/TaskSpecResourcesNormalizer.php index a8b7e0fc..330b1b4b 100644 --- a/src/Normalizer/TaskSpecResourcesNormalizer.php +++ b/src/Normalizer/TaskSpecResourcesNormalizer.php @@ -41,8 +41,8 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'Limits') && $data->{'Limits'} !== null) { $object->setLimits($this->denormalizer->denormalize($data->{'Limits'}, 'Docker\\API\\Model\\ResourceObject', 'json', $context)); } - if (property_exists($data, 'Reservation') && $data->{'Reservation'} !== null) { - $object->setReservation($this->denormalizer->denormalize($data->{'Reservation'}, 'Docker\\API\\Model\\ResourceObject', 'json', $context)); + if (property_exists($data, 'Reservations') && $data->{'Reservations'} !== null) { + $object->setReservations($this->denormalizer->denormalize($data->{'Reservations'}, 'Docker\\API\\Model\\ResourceObject', 'json', $context)); } return $object; @@ -54,8 +54,8 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getLimits()) { $data->{'Limits'} = $this->normalizer->normalize($object->getLimits(), 'json', $context); } - if (null !== $object->getReservation()) { - $data->{'Reservation'} = $this->normalizer->normalize($object->getReservation(), 'json', $context); + if (null !== $object->getReservations()) { + $data->{'Reservations'} = $this->normalizer->normalize($object->getReservations(), 'json', $context); } return $data;