From 7250891fbba5a536617d183a477406959b170b9b Mon Sep 17 00:00:00 2001 From: Michael Strong Date: Sat, 1 Jul 2017 07:01:14 +1200 Subject: [PATCH 1/5] DOCS Add mount volume and port mapping examples (#245) --- docs/cookbook/container-run.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/cookbook/container-run.md b/docs/cookbook/container-run.md index bf42b409..7d6aa4a5 100644 --- a/docs/cookbook/container-run.md +++ b/docs/cookbook/container-run.md @@ -166,3 +166,37 @@ $containerConfig->setTty(true); ``` Be aware that there is no distinction between stdout and stderr in this mode. + + +## Mounting a Volume + +This example shows you can map your host volume `/home/myuser/myapp` to a container at `/app` + +```php +$containerConfig->setVolumes(['/home/myuser/myapp' => (object) []]); + +$hostConfig = new HostConfig(); +// hostpath:containerpath +$hostConfig->setBinds(['/home/myuser/myapp:/app']); + +$containerConfig->setHostConfig($hostConfig); +``` + +## Port Mapping + +This example shows how you can map port 8080 on your host machine to port 80 on the container. + +```php +$containerConfig->setTty(true); +$containerConfig->setExposedPorts(['80/tcp' => (object)[]]); + +$portBinding = new PortBinding(); +$portBinding->setHostPort('8080'); +$portBinding->setHostIp('0.0.0.0'); + +$portMap = new \ArrayObject(); +$portMap['80/tcp'] = [$portBinding]; + +$hostConfig = new HostConfig(); +$hostConfig->setPortBindings($portMap); +``` From b1f822980dbbaad6c76fbcf1f17d26dfab7c7df6 Mon Sep 17 00:00:00 2001 From: Michael Strong Date: Sat, 1 Jul 2017 07:01:37 +1200 Subject: [PATCH 2/5] DOCS correct referent to 'FETCH_STREAM' const (#244) --- docs/cookbook/build-image.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cookbook/build-image.md b/docs/cookbook/build-image.md index bbb5fce8..3de39071 100644 --- a/docs/cookbook/build-image.md +++ b/docs/cookbook/build-image.md @@ -76,7 +76,7 @@ stream in real time. The callback will receive a `BuildInfo` object once a line is available: ```php -$buildStream = $imageManager->build($inputStream, [], ContainerManager::FETCH_STREAM); +$buildStream = $imageManager->build($inputStream, [], ImageManager::FETCH_STREAM); $buildStream->onFrame(function (BuildInfo $buildInfo) { echo $buildInfo->getStream(); }); From cd8298494ac76576372c2ed0f49dba94451d65fd Mon Sep 17 00:00:00 2001 From: Joel Wurtz Date: Fri, 20 Oct 2017 21:27:14 +0200 Subject: [PATCH 3/5] Fix bad endpoint url --- .jane-openapi | 7 + docker-swagger.json | 2 +- .../Normalizer/AnnotationsNormalizer.php | 10 - generated/Normalizer/AuthConfigNormalizer.php | 10 - generated/Normalizer/AuthResultNormalizer.php | 10 - generated/Normalizer/BuildInfoNormalizer.php | 10 - .../Normalizer/CommitResultNormalizer.php | 10 - .../Normalizer/ContainerChangeNormalizer.php | 10 - .../Normalizer/ContainerConfigNormalizer.php | 10 - .../Normalizer/ContainerConnectNormalizer.php | 10 - .../ContainerCreateResultNormalizer.php | 10 - .../ContainerDisconnectNormalizer.php | 10 - .../Normalizer/ContainerInfoNormalizer.php | 10 - .../Normalizer/ContainerNetworkNormalizer.php | 10 - .../Normalizer/ContainerNodeNormalizer.php | 10 - generated/Normalizer/ContainerNormalizer.php | 10 - ...ontainerSpecMountBindOptionsNormalizer.php | 10 - .../ContainerSpecMountNormalizer.php | 10 - ...tainerSpecMountVolumeOptionsNormalizer.php | 10 - .../Normalizer/ContainerSpecNormalizer.php | 10 - .../Normalizer/ContainerStateNormalizer.php | 10 - .../Normalizer/ContainerStatusNormalizer.php | 10 - .../Normalizer/ContainerTopNormalizer.php | 10 - .../ContainerUpdateResultNormalizer.php | 10 - .../Normalizer/ContainerWaitNormalizer.php | 10 - .../Normalizer/CreateImageInfoNormalizer.php | 10 - generated/Normalizer/DeviceNormalizer.php | 10 - generated/Normalizer/DeviceRateNormalizer.php | 10 - .../Normalizer/DeviceWeightNormalizer.php | 10 - generated/Normalizer/DriverNormalizer.php | 10 - .../Normalizer/EndpointConfigNormalizer.php | 10 - .../EndpointIPAMConfigNormalizer.php | 10 - generated/Normalizer/EndpointNormalizer.php | 10 - .../Normalizer/EndpointSettingsNormalizer.php | 10 - .../Normalizer/EndpointSpecNormalizer.php | 10 - .../EndpointVirtualIPNormalizer.php | 10 - .../Normalizer/ErrorDetailNormalizer.php | 10 - generated/Normalizer/EventNormalizer.php | 10 - .../Normalizer/ExecCommandNormalizer.php | 10 - generated/Normalizer/ExecConfigNormalizer.php | 10 - .../Normalizer/ExecCreateResultNormalizer.php | 10 - .../Normalizer/ExecStartConfigNormalizer.php | 10 - .../Normalizer/GlobalServiceNormalizer.php | 10 - .../Normalizer/GraphDriverNormalizer.php | 10 - generated/Normalizer/HostConfigNormalizer.php | 10 - generated/Normalizer/IPAMConfigNormalizer.php | 10 - generated/Normalizer/IPAMNormalizer.php | 10 - .../Normalizer/ImageHistoryItemNormalizer.php | 10 - generated/Normalizer/ImageItemNormalizer.php | 10 - generated/Normalizer/ImageNormalizer.php | 10 - .../ImageSearchResultNormalizer.php | 10 - generated/Normalizer/LogConfigNormalizer.php | 10 - generated/Normalizer/MountNormalizer.php | 10 - .../NetworkAttachmentConfigNormalizer.php | 10 - .../NetworkAttachmentNormalizer.php | 10 - .../Normalizer/NetworkConfigNormalizer.php | 10 - .../Normalizer/NetworkContainerNormalizer.php | 10 - .../NetworkCreateConfigNormalizer.php | 10 - .../NetworkCreateResultNormalizer.php | 10 - generated/Normalizer/NetworkNormalizer.php | 10 - .../Normalizer/NetworkingConfigNormalizer.php | 10 - .../Normalizer/NodeDescriptionNormalizer.php | 10 - generated/Normalizer/NodeEngineNormalizer.php | 10 - .../NodeManagerStatusNormalizer.php | 10 - generated/Normalizer/NodeNormalizer.php | 10 - .../Normalizer/NodePlatformNormalizer.php | 10 - generated/Normalizer/NodePluginNormalizer.php | 10 - .../Normalizer/NodeResourcesNormalizer.php | 10 - generated/Normalizer/NodeSpecNormalizer.php | 10 - generated/Normalizer/NodeStatusNormalizer.php | 10 - .../Normalizer/NodeVersionNormalizer.php | 10 - generated/Normalizer/NormalizerFactory.php | 6 +- .../Normalizer/PortBindingNormalizer.php | 10 - generated/Normalizer/PortConfigNormalizer.php | 10 - generated/Normalizer/PortNormalizer.php | 10 - .../Normalizer/ProcessConfigNormalizer.php | 10 - .../Normalizer/ProgressDetailNormalizer.php | 10 - .../Normalizer/PushImageInfoNormalizer.php | 10 - .../Normalizer/RegistryConfigNormalizer.php | 10 - generated/Normalizer/RegistryNormalizer.php | 10 - .../ReplicatedServiceNormalizer.php | 10 - .../Normalizer/ResourceUpdateNormalizer.php | 10 - .../Normalizer/RestartPolicyNormalizer.php | 10 - .../ServiceCreateResponseNormalizer.php | 10 - generated/Normalizer/ServiceNormalizer.php | 10 - .../Normalizer/ServiceSpecModeNormalizer.php | 10 - .../Normalizer/ServiceSpecNormalizer.php | 10 - .../Normalizer/SwarmConfigNormalizer.php | 10 - ...ConfigSpecCAConfigExternalCANormalizer.php | 10 - .../SwarmConfigSpecCAConfigNormalizer.php | 10 - .../SwarmConfigSpecDispatcherNormalizer.php | 10 - .../Normalizer/SwarmConfigSpecNormalizer.php | 10 - ...SwarmConfigSpecOrchestrationNormalizer.php | 10 - .../SwarmConfigSpecRaftNormalizer.php | 10 - .../Normalizer/SwarmIPAMOptionsNormalizer.php | 10 - .../Normalizer/SwarmJoinConfigNormalizer.php | 10 - .../Normalizer/SwarmJoinTokensNormalizer.php | 10 - .../Normalizer/SwarmNetworkNormalizer.php | 10 - .../Normalizer/SwarmNetworkSpecNormalizer.php | 10 - .../SwarmUpdateConfigNormalizer.php | 10 - .../SystemInformationNormalizer.php | 10 - generated/Normalizer/TaskNormalizer.php | 10 - generated/Normalizer/TaskSpecNormalizer.php | 10 - .../TaskSpecPlacementNormalizer.php | 10 - ...TaskSpecResourceRequirementsNormalizer.php | 10 - .../TaskSpecRestartPolicyNormalizer.php | 10 - generated/Normalizer/TaskStatusNormalizer.php | 10 - generated/Normalizer/UlimitNormalizer.php | 10 - .../Normalizer/UpdateConfigNormalizer.php | 10 - .../Normalizer/UpdateStatusNormalizer.php | 10 - generated/Normalizer/VersionNormalizer.php | 10 - .../Normalizer/VolumeConfigNormalizer.php | 10 - generated/Normalizer/VolumeListNormalizer.php | 10 - generated/Normalizer/VolumeNormalizer.php | 10 - generated/Resource/ContainerResource.php | 356 +++++++++++------- generated/Resource/ExecResource.php | 60 +-- generated/Resource/ImageResource.php | 174 ++++++--- generated/Resource/MiscResource.php | 40 +- generated/Resource/NetworkResource.php | 80 ++-- generated/Resource/NodeResource.php | 22 +- generated/Resource/ServiceResource.php | 56 ++- generated/Resource/SwarmResource.php | 34 +- generated/Resource/TaskResource.php | 22 +- generated/Resource/VolumeResource.php | 44 ++- tests/Manager/ImageManagerTest.php | 4 +- 125 files changed, 593 insertions(+), 1424 deletions(-) create mode 100644 .jane-openapi diff --git a/.jane-openapi b/.jane-openapi new file mode 100644 index 00000000..6822343e --- /dev/null +++ b/.jane-openapi @@ -0,0 +1,7 @@ + 'generated/', + 'namespace' => 'Docker\\API', + 'openapi-file' => __DIR__ . '/docker-swagger.json', +]; diff --git a/docker-swagger.json b/docker-swagger.json index a6a68ad6..78ed1c77 100644 --- a/docker-swagger.json +++ b/docker-swagger.json @@ -5070,7 +5070,7 @@ ] } }, - "/service/{id}": { + "/services/{id}": { "delete": { "summary": "Remove a service", "description": "Stop and remove the service id", diff --git a/generated/Normalizer/AnnotationsNormalizer.php b/generated/Normalizer/AnnotationsNormalizer.php index c0fb9b0c..8755506f 100644 --- a/generated/Normalizer/AnnotationsNormalizer.php +++ b/generated/Normalizer/AnnotationsNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Annotations(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/AuthConfigNormalizer.php b/generated/Normalizer/AuthConfigNormalizer.php index e61b438a..17160b04 100644 --- a/generated/Normalizer/AuthConfigNormalizer.php +++ b/generated/Normalizer/AuthConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\AuthConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'username')) { $object->setUsername($data->{'username'}); } diff --git a/generated/Normalizer/AuthResultNormalizer.php b/generated/Normalizer/AuthResultNormalizer.php index 7b37ed4c..0e4f30c6 100644 --- a/generated/Normalizer/AuthResultNormalizer.php +++ b/generated/Normalizer/AuthResultNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\AuthResult(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Status')) { $object->setStatus($data->{'Status'}); } diff --git a/generated/Normalizer/BuildInfoNormalizer.php b/generated/Normalizer/BuildInfoNormalizer.php index b2799174..21989d19 100644 --- a/generated/Normalizer/BuildInfoNormalizer.php +++ b/generated/Normalizer/BuildInfoNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\BuildInfo(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'id')) { $object->setId($data->{'id'}); } diff --git a/generated/Normalizer/CommitResultNormalizer.php b/generated/Normalizer/CommitResultNormalizer.php index 45d40938..37576d5e 100644 --- a/generated/Normalizer/CommitResultNormalizer.php +++ b/generated/Normalizer/CommitResultNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\CommitResult(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Id')) { $object->setId($data->{'Id'}); } diff --git a/generated/Normalizer/ContainerChangeNormalizer.php b/generated/Normalizer/ContainerChangeNormalizer.php index bac20b13..c79fb923 100644 --- a/generated/Normalizer/ContainerChangeNormalizer.php +++ b/generated/Normalizer/ContainerChangeNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerChange(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Path')) { $object->setPath($data->{'Path'}); } diff --git a/generated/Normalizer/ContainerConfigNormalizer.php b/generated/Normalizer/ContainerConfigNormalizer.php index 50efe5b5..24baf5cd 100644 --- a/generated/Normalizer/ContainerConfigNormalizer.php +++ b/generated/Normalizer/ContainerConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Hostname')) { $object->setHostname($data->{'Hostname'}); } diff --git a/generated/Normalizer/ContainerConnectNormalizer.php b/generated/Normalizer/ContainerConnectNormalizer.php index 8c6ad5b5..f23a3b59 100644 --- a/generated/Normalizer/ContainerConnectNormalizer.php +++ b/generated/Normalizer/ContainerConnectNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerConnect(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Container')) { $object->setContainer($data->{'Container'}); } diff --git a/generated/Normalizer/ContainerCreateResultNormalizer.php b/generated/Normalizer/ContainerCreateResultNormalizer.php index d4c6afd8..03c2b036 100644 --- a/generated/Normalizer/ContainerCreateResultNormalizer.php +++ b/generated/Normalizer/ContainerCreateResultNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerCreateResult(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Id')) { $object->setId($data->{'Id'}); } diff --git a/generated/Normalizer/ContainerDisconnectNormalizer.php b/generated/Normalizer/ContainerDisconnectNormalizer.php index 29f045f4..d6304ef3 100644 --- a/generated/Normalizer/ContainerDisconnectNormalizer.php +++ b/generated/Normalizer/ContainerDisconnectNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerDisconnect(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Container')) { $object->setContainer($data->{'Container'}); } diff --git a/generated/Normalizer/ContainerInfoNormalizer.php b/generated/Normalizer/ContainerInfoNormalizer.php index 9b6994aa..8c5b81aa 100644 --- a/generated/Normalizer/ContainerInfoNormalizer.php +++ b/generated/Normalizer/ContainerInfoNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerInfo(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Id')) { $object->setId($data->{'Id'}); } diff --git a/generated/Normalizer/ContainerNetworkNormalizer.php b/generated/Normalizer/ContainerNetworkNormalizer.php index 8fda0a58..3f6469c3 100644 --- a/generated/Normalizer/ContainerNetworkNormalizer.php +++ b/generated/Normalizer/ContainerNetworkNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerNetwork(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'NetworkID')) { $object->setNetworkID($data->{'NetworkID'}); } diff --git a/generated/Normalizer/ContainerNodeNormalizer.php b/generated/Normalizer/ContainerNodeNormalizer.php index d9836b7f..5aa9fb16 100644 --- a/generated/Normalizer/ContainerNodeNormalizer.php +++ b/generated/Normalizer/ContainerNodeNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerNode(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Id')) { $object->setId($data->{'Id'}); } diff --git a/generated/Normalizer/ContainerNormalizer.php b/generated/Normalizer/ContainerNormalizer.php index 5ad878e8..5c973cf5 100644 --- a/generated/Normalizer/ContainerNormalizer.php +++ b/generated/Normalizer/ContainerNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Container(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'AppArmorProfile')) { $object->setAppArmorProfile($data->{'AppArmorProfile'}); } diff --git a/generated/Normalizer/ContainerSpecMountBindOptionsNormalizer.php b/generated/Normalizer/ContainerSpecMountBindOptionsNormalizer.php index 45305472..e74f3a5f 100644 --- a/generated/Normalizer/ContainerSpecMountBindOptionsNormalizer.php +++ b/generated/Normalizer/ContainerSpecMountBindOptionsNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerSpecMountBindOptions(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Propagation')) { $object->setPropagation($data->{'Propagation'}); } diff --git a/generated/Normalizer/ContainerSpecMountNormalizer.php b/generated/Normalizer/ContainerSpecMountNormalizer.php index 375ae908..0719155a 100644 --- a/generated/Normalizer/ContainerSpecMountNormalizer.php +++ b/generated/Normalizer/ContainerSpecMountNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerSpecMount(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Type')) { $object->setType($data->{'Type'}); } diff --git a/generated/Normalizer/ContainerSpecMountVolumeOptionsNormalizer.php b/generated/Normalizer/ContainerSpecMountVolumeOptionsNormalizer.php index 855aa63c..fc2f5855 100644 --- a/generated/Normalizer/ContainerSpecMountVolumeOptionsNormalizer.php +++ b/generated/Normalizer/ContainerSpecMountVolumeOptionsNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerSpecMountVolumeOptions(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'NoCopy')) { $object->setNoCopy($data->{'NoCopy'}); } diff --git a/generated/Normalizer/ContainerSpecNormalizer.php b/generated/Normalizer/ContainerSpecNormalizer.php index 8fac999b..9f7e8b36 100644 --- a/generated/Normalizer/ContainerSpecNormalizer.php +++ b/generated/Normalizer/ContainerSpecNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerSpec(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Image')) { $object->setImage($data->{'Image'}); } diff --git a/generated/Normalizer/ContainerStateNormalizer.php b/generated/Normalizer/ContainerStateNormalizer.php index 11c3b606..70448414 100644 --- a/generated/Normalizer/ContainerStateNormalizer.php +++ b/generated/Normalizer/ContainerStateNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerState(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Error')) { $object->setError($data->{'Error'}); } diff --git a/generated/Normalizer/ContainerStatusNormalizer.php b/generated/Normalizer/ContainerStatusNormalizer.php index 8f9d5397..624fd24e 100644 --- a/generated/Normalizer/ContainerStatusNormalizer.php +++ b/generated/Normalizer/ContainerStatusNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerStatus(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'ContainerID')) { $object->setContainerID($data->{'ContainerID'}); } diff --git a/generated/Normalizer/ContainerTopNormalizer.php b/generated/Normalizer/ContainerTopNormalizer.php index 447c57ad..6d1128af 100644 --- a/generated/Normalizer/ContainerTopNormalizer.php +++ b/generated/Normalizer/ContainerTopNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerTop(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Titles')) { $value = $data->{'Titles'}; if (is_array($data->{'Titles'})) { diff --git a/generated/Normalizer/ContainerUpdateResultNormalizer.php b/generated/Normalizer/ContainerUpdateResultNormalizer.php index 4814cff5..38a10a25 100644 --- a/generated/Normalizer/ContainerUpdateResultNormalizer.php +++ b/generated/Normalizer/ContainerUpdateResultNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerUpdateResult(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Warnings')) { $value = $data->{'Warnings'}; if (is_array($data->{'Warnings'})) { diff --git a/generated/Normalizer/ContainerWaitNormalizer.php b/generated/Normalizer/ContainerWaitNormalizer.php index fb834ff1..9ae2caa5 100644 --- a/generated/Normalizer/ContainerWaitNormalizer.php +++ b/generated/Normalizer/ContainerWaitNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ContainerWait(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'StatusCode')) { $object->setStatusCode($data->{'StatusCode'}); } diff --git a/generated/Normalizer/CreateImageInfoNormalizer.php b/generated/Normalizer/CreateImageInfoNormalizer.php index f002e7bf..aabdd222 100644 --- a/generated/Normalizer/CreateImageInfoNormalizer.php +++ b/generated/Normalizer/CreateImageInfoNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\CreateImageInfo(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'error')) { $object->setError($data->{'error'}); } diff --git a/generated/Normalizer/DeviceNormalizer.php b/generated/Normalizer/DeviceNormalizer.php index 36142132..f462a3e3 100644 --- a/generated/Normalizer/DeviceNormalizer.php +++ b/generated/Normalizer/DeviceNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Device(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'PathOnHost')) { $object->setPathOnHost($data->{'PathOnHost'}); } diff --git a/generated/Normalizer/DeviceRateNormalizer.php b/generated/Normalizer/DeviceRateNormalizer.php index cc1ecaa0..bc4a6e1f 100644 --- a/generated/Normalizer/DeviceRateNormalizer.php +++ b/generated/Normalizer/DeviceRateNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\DeviceRate(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Path')) { $object->setPath($data->{'Path'}); } diff --git a/generated/Normalizer/DeviceWeightNormalizer.php b/generated/Normalizer/DeviceWeightNormalizer.php index fee8a119..7522f86e 100644 --- a/generated/Normalizer/DeviceWeightNormalizer.php +++ b/generated/Normalizer/DeviceWeightNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\DeviceWeight(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Path')) { $object->setPath($data->{'Path'}); } diff --git a/generated/Normalizer/DriverNormalizer.php b/generated/Normalizer/DriverNormalizer.php index 17e02b17..794bb560 100644 --- a/generated/Normalizer/DriverNormalizer.php +++ b/generated/Normalizer/DriverNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Driver(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/EndpointConfigNormalizer.php b/generated/Normalizer/EndpointConfigNormalizer.php index b7ec6799..42120a9d 100644 --- a/generated/Normalizer/EndpointConfigNormalizer.php +++ b/generated/Normalizer/EndpointConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\EndpointConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'IPv4Address')) { $object->setIPv4Address($data->{'IPv4Address'}); } diff --git a/generated/Normalizer/EndpointIPAMConfigNormalizer.php b/generated/Normalizer/EndpointIPAMConfigNormalizer.php index 00989788..226d5251 100644 --- a/generated/Normalizer/EndpointIPAMConfigNormalizer.php +++ b/generated/Normalizer/EndpointIPAMConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\EndpointIPAMConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'IPv4Address')) { $object->setIPv4Address($data->{'IPv4Address'}); } diff --git a/generated/Normalizer/EndpointNormalizer.php b/generated/Normalizer/EndpointNormalizer.php index 33b74388..fa29a623 100644 --- a/generated/Normalizer/EndpointNormalizer.php +++ b/generated/Normalizer/EndpointNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Endpoint(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Spec')) { $object->setSpec($this->serializer->deserialize($data->{'Spec'}, 'Docker\\API\\Model\\EndpointSpec', 'raw', $context)); } diff --git a/generated/Normalizer/EndpointSettingsNormalizer.php b/generated/Normalizer/EndpointSettingsNormalizer.php index 93035698..67f2caff 100644 --- a/generated/Normalizer/EndpointSettingsNormalizer.php +++ b/generated/Normalizer/EndpointSettingsNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\EndpointSettings(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'IPAMConfig')) { $object->setIPAMConfig($this->serializer->deserialize($data->{'IPAMConfig'}, 'Docker\\API\\Model\\EndpointIPAMConfig', 'raw', $context)); } diff --git a/generated/Normalizer/EndpointSpecNormalizer.php b/generated/Normalizer/EndpointSpecNormalizer.php index 053ff760..6a75edc7 100644 --- a/generated/Normalizer/EndpointSpecNormalizer.php +++ b/generated/Normalizer/EndpointSpecNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\EndpointSpec(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Mode')) { $object->setMode($data->{'Mode'}); } diff --git a/generated/Normalizer/EndpointVirtualIPNormalizer.php b/generated/Normalizer/EndpointVirtualIPNormalizer.php index 335801c6..481e651d 100644 --- a/generated/Normalizer/EndpointVirtualIPNormalizer.php +++ b/generated/Normalizer/EndpointVirtualIPNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\EndpointVirtualIP(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'NetworkID')) { $object->setNetworkID($data->{'NetworkID'}); } diff --git a/generated/Normalizer/ErrorDetailNormalizer.php b/generated/Normalizer/ErrorDetailNormalizer.php index 0b54c928..f9f8e49c 100644 --- a/generated/Normalizer/ErrorDetailNormalizer.php +++ b/generated/Normalizer/ErrorDetailNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ErrorDetail(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'code')) { $object->setCode($data->{'code'}); } diff --git a/generated/Normalizer/EventNormalizer.php b/generated/Normalizer/EventNormalizer.php index 685e7ae6..3ca6631c 100644 --- a/generated/Normalizer/EventNormalizer.php +++ b/generated/Normalizer/EventNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Event(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'status')) { $object->setStatus($data->{'status'}); } diff --git a/generated/Normalizer/ExecCommandNormalizer.php b/generated/Normalizer/ExecCommandNormalizer.php index 840856c1..4a7b9a4a 100644 --- a/generated/Normalizer/ExecCommandNormalizer.php +++ b/generated/Normalizer/ExecCommandNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ExecCommand(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'ID')) { $object->setID($data->{'ID'}); } diff --git a/generated/Normalizer/ExecConfigNormalizer.php b/generated/Normalizer/ExecConfigNormalizer.php index 8a15f38a..f4c91578 100644 --- a/generated/Normalizer/ExecConfigNormalizer.php +++ b/generated/Normalizer/ExecConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ExecConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'AttachStdin')) { $object->setAttachStdin($data->{'AttachStdin'}); } diff --git a/generated/Normalizer/ExecCreateResultNormalizer.php b/generated/Normalizer/ExecCreateResultNormalizer.php index 35f20888..117c50c3 100644 --- a/generated/Normalizer/ExecCreateResultNormalizer.php +++ b/generated/Normalizer/ExecCreateResultNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ExecCreateResult(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Id')) { $object->setId($data->{'Id'}); } diff --git a/generated/Normalizer/ExecStartConfigNormalizer.php b/generated/Normalizer/ExecStartConfigNormalizer.php index 34a67dea..7f3235fd 100644 --- a/generated/Normalizer/ExecStartConfigNormalizer.php +++ b/generated/Normalizer/ExecStartConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ExecStartConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Detach')) { $object->setDetach($data->{'Detach'}); } diff --git a/generated/Normalizer/GlobalServiceNormalizer.php b/generated/Normalizer/GlobalServiceNormalizer.php index 0fa95f63..48a7fcd9 100644 --- a/generated/Normalizer/GlobalServiceNormalizer.php +++ b/generated/Normalizer/GlobalServiceNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\GlobalService(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } return $object; } diff --git a/generated/Normalizer/GraphDriverNormalizer.php b/generated/Normalizer/GraphDriverNormalizer.php index 10a22cad..ebba2fcf 100644 --- a/generated/Normalizer/GraphDriverNormalizer.php +++ b/generated/Normalizer/GraphDriverNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\GraphDriver(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/HostConfigNormalizer.php b/generated/Normalizer/HostConfigNormalizer.php index f2477bea..276a40e9 100644 --- a/generated/Normalizer/HostConfigNormalizer.php +++ b/generated/Normalizer/HostConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\HostConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Binds')) { $value = $data->{'Binds'}; if (is_array($data->{'Binds'})) { diff --git a/generated/Normalizer/IPAMConfigNormalizer.php b/generated/Normalizer/IPAMConfigNormalizer.php index c5230bf0..fc15aa28 100644 --- a/generated/Normalizer/IPAMConfigNormalizer.php +++ b/generated/Normalizer/IPAMConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\IPAMConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Subnet')) { $object->setSubnet($data->{'Subnet'}); } diff --git a/generated/Normalizer/IPAMNormalizer.php b/generated/Normalizer/IPAMNormalizer.php index 7e0bea56..57da8bc2 100644 --- a/generated/Normalizer/IPAMNormalizer.php +++ b/generated/Normalizer/IPAMNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\IPAM(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Driver')) { $object->setDriver($data->{'Driver'}); } diff --git a/generated/Normalizer/ImageHistoryItemNormalizer.php b/generated/Normalizer/ImageHistoryItemNormalizer.php index 016a0c6b..93b6d365 100644 --- a/generated/Normalizer/ImageHistoryItemNormalizer.php +++ b/generated/Normalizer/ImageHistoryItemNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ImageHistoryItem(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Id')) { $object->setId($data->{'Id'}); } diff --git a/generated/Normalizer/ImageItemNormalizer.php b/generated/Normalizer/ImageItemNormalizer.php index bc7b6b37..7cdae027 100644 --- a/generated/Normalizer/ImageItemNormalizer.php +++ b/generated/Normalizer/ImageItemNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ImageItem(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'RepoTags')) { $value = $data->{'RepoTags'}; if (is_array($data->{'RepoTags'})) { diff --git a/generated/Normalizer/ImageNormalizer.php b/generated/Normalizer/ImageNormalizer.php index a7dbb3fc..323e02ec 100644 --- a/generated/Normalizer/ImageNormalizer.php +++ b/generated/Normalizer/ImageNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Image(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Id')) { $object->setId($data->{'Id'}); } diff --git a/generated/Normalizer/ImageSearchResultNormalizer.php b/generated/Normalizer/ImageSearchResultNormalizer.php index 96f14eb6..9dba9f32 100644 --- a/generated/Normalizer/ImageSearchResultNormalizer.php +++ b/generated/Normalizer/ImageSearchResultNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ImageSearchResult(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'description')) { $object->setDescription($data->{'description'}); } diff --git a/generated/Normalizer/LogConfigNormalizer.php b/generated/Normalizer/LogConfigNormalizer.php index 34abc761..a49daf6e 100644 --- a/generated/Normalizer/LogConfigNormalizer.php +++ b/generated/Normalizer/LogConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\LogConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Type')) { $object->setType($data->{'Type'}); } diff --git a/generated/Normalizer/MountNormalizer.php b/generated/Normalizer/MountNormalizer.php index a1a9e8dd..68a87fd6 100644 --- a/generated/Normalizer/MountNormalizer.php +++ b/generated/Normalizer/MountNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Mount(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/NetworkAttachmentConfigNormalizer.php b/generated/Normalizer/NetworkAttachmentConfigNormalizer.php index 75bf0115..2210f8bc 100644 --- a/generated/Normalizer/NetworkAttachmentConfigNormalizer.php +++ b/generated/Normalizer/NetworkAttachmentConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NetworkAttachmentConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Target')) { $object->setTarget($data->{'Target'}); } diff --git a/generated/Normalizer/NetworkAttachmentNormalizer.php b/generated/Normalizer/NetworkAttachmentNormalizer.php index 5ef8d395..2ac4e1b4 100644 --- a/generated/Normalizer/NetworkAttachmentNormalizer.php +++ b/generated/Normalizer/NetworkAttachmentNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NetworkAttachment(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Network')) { $object->setNetwork($this->serializer->deserialize($data->{'Network'}, 'Docker\\API\\Model\\SwarmNetwork', 'raw', $context)); } diff --git a/generated/Normalizer/NetworkConfigNormalizer.php b/generated/Normalizer/NetworkConfigNormalizer.php index e4e7f12c..41dfe8a8 100644 --- a/generated/Normalizer/NetworkConfigNormalizer.php +++ b/generated/Normalizer/NetworkConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NetworkConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Bridge')) { $object->setBridge($data->{'Bridge'}); } diff --git a/generated/Normalizer/NetworkContainerNormalizer.php b/generated/Normalizer/NetworkContainerNormalizer.php index 7d38a689..fdd238e8 100644 --- a/generated/Normalizer/NetworkContainerNormalizer.php +++ b/generated/Normalizer/NetworkContainerNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NetworkContainer(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/NetworkCreateConfigNormalizer.php b/generated/Normalizer/NetworkCreateConfigNormalizer.php index 71bbbc5d..856301c0 100644 --- a/generated/Normalizer/NetworkCreateConfigNormalizer.php +++ b/generated/Normalizer/NetworkCreateConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NetworkCreateConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/NetworkCreateResultNormalizer.php b/generated/Normalizer/NetworkCreateResultNormalizer.php index d66c6339..6ab2f7f7 100644 --- a/generated/Normalizer/NetworkCreateResultNormalizer.php +++ b/generated/Normalizer/NetworkCreateResultNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NetworkCreateResult(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Id')) { $object->setId($data->{'Id'}); } diff --git a/generated/Normalizer/NetworkNormalizer.php b/generated/Normalizer/NetworkNormalizer.php index 622d9ee6..3def1e86 100644 --- a/generated/Normalizer/NetworkNormalizer.php +++ b/generated/Normalizer/NetworkNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Network(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/NetworkingConfigNormalizer.php b/generated/Normalizer/NetworkingConfigNormalizer.php index 4ed43a1b..6c5eeaad 100644 --- a/generated/Normalizer/NetworkingConfigNormalizer.php +++ b/generated/Normalizer/NetworkingConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NetworkingConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'EndpointsConfig')) { $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($data->{'EndpointsConfig'} as $key => $value) { diff --git a/generated/Normalizer/NodeDescriptionNormalizer.php b/generated/Normalizer/NodeDescriptionNormalizer.php index 5a296dc7..b849bf4f 100644 --- a/generated/Normalizer/NodeDescriptionNormalizer.php +++ b/generated/Normalizer/NodeDescriptionNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NodeDescription(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Hostname')) { $object->setHostname($data->{'Hostname'}); } diff --git a/generated/Normalizer/NodeEngineNormalizer.php b/generated/Normalizer/NodeEngineNormalizer.php index d63feda1..aec86fca 100644 --- a/generated/Normalizer/NodeEngineNormalizer.php +++ b/generated/Normalizer/NodeEngineNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NodeEngine(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'EngineVersion')) { $object->setEngineVersion($data->{'EngineVersion'}); } diff --git a/generated/Normalizer/NodeManagerStatusNormalizer.php b/generated/Normalizer/NodeManagerStatusNormalizer.php index e5268d35..63d3f4d6 100644 --- a/generated/Normalizer/NodeManagerStatusNormalizer.php +++ b/generated/Normalizer/NodeManagerStatusNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NodeManagerStatus(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Leader')) { $object->setLeader($data->{'Leader'}); } diff --git a/generated/Normalizer/NodeNormalizer.php b/generated/Normalizer/NodeNormalizer.php index 388631a4..790b86c9 100644 --- a/generated/Normalizer/NodeNormalizer.php +++ b/generated/Normalizer/NodeNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Node(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'ID')) { $object->setID($data->{'ID'}); } diff --git a/generated/Normalizer/NodePlatformNormalizer.php b/generated/Normalizer/NodePlatformNormalizer.php index 0d9b8dab..dce2a4c2 100644 --- a/generated/Normalizer/NodePlatformNormalizer.php +++ b/generated/Normalizer/NodePlatformNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NodePlatform(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Architecture')) { $object->setArchitecture($data->{'Architecture'}); } diff --git a/generated/Normalizer/NodePluginNormalizer.php b/generated/Normalizer/NodePluginNormalizer.php index 5bb6d7fd..6286e683 100644 --- a/generated/Normalizer/NodePluginNormalizer.php +++ b/generated/Normalizer/NodePluginNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NodePlugin(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Type')) { $object->setType($data->{'Type'}); } diff --git a/generated/Normalizer/NodeResourcesNormalizer.php b/generated/Normalizer/NodeResourcesNormalizer.php index 8bbea76c..fe624b35 100644 --- a/generated/Normalizer/NodeResourcesNormalizer.php +++ b/generated/Normalizer/NodeResourcesNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NodeResources(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'NanoCPUs')) { $object->setNanoCPUs($data->{'NanoCPUs'}); } diff --git a/generated/Normalizer/NodeSpecNormalizer.php b/generated/Normalizer/NodeSpecNormalizer.php index 7f0116a9..b8af5832 100644 --- a/generated/Normalizer/NodeSpecNormalizer.php +++ b/generated/Normalizer/NodeSpecNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NodeSpec(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/NodeStatusNormalizer.php b/generated/Normalizer/NodeStatusNormalizer.php index df910c41..0cc45eb5 100644 --- a/generated/Normalizer/NodeStatusNormalizer.php +++ b/generated/Normalizer/NodeStatusNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NodeStatus(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'State')) { $object->setState($data->{'State'}); } diff --git a/generated/Normalizer/NodeVersionNormalizer.php b/generated/Normalizer/NodeVersionNormalizer.php index 7deccc9a..719a60b8 100644 --- a/generated/Normalizer/NodeVersionNormalizer.php +++ b/generated/Normalizer/NodeVersionNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\NodeVersion(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Index')) { $object->setIndex($data->{'Index'}); } diff --git a/generated/Normalizer/NormalizerFactory.php b/generated/Normalizer/NormalizerFactory.php index 252a930e..0033aab3 100644 --- a/generated/Normalizer/NormalizerFactory.php +++ b/generated/Normalizer/NormalizerFactory.php @@ -2,16 +2,12 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Normalizer\NormalizerArray; -use Joli\Jane\Normalizer\ReferenceNormalizer; - class NormalizerFactory { public static function create() { $normalizers = []; - $normalizers[] = new ReferenceNormalizer(); - $normalizers[] = new NormalizerArray(); + $normalizers[] = new \Joli\Jane\Runtime\Normalizer\ArrayDenormalizer(); $normalizers[] = new VersionNormalizer(); $normalizers[] = new PortNormalizer(); $normalizers[] = new MountNormalizer(); diff --git a/generated/Normalizer/PortBindingNormalizer.php b/generated/Normalizer/PortBindingNormalizer.php index 9e70afb1..8d281650 100644 --- a/generated/Normalizer/PortBindingNormalizer.php +++ b/generated/Normalizer/PortBindingNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\PortBinding(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'HostPort')) { $object->setHostPort($data->{'HostPort'}); } diff --git a/generated/Normalizer/PortConfigNormalizer.php b/generated/Normalizer/PortConfigNormalizer.php index 10e64ab3..85e56f33 100644 --- a/generated/Normalizer/PortConfigNormalizer.php +++ b/generated/Normalizer/PortConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\PortConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/PortNormalizer.php b/generated/Normalizer/PortNormalizer.php index f3041851..0c27740e 100644 --- a/generated/Normalizer/PortNormalizer.php +++ b/generated/Normalizer/PortNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Port(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'PrivatePort')) { $object->setPrivatePort($data->{'PrivatePort'}); } diff --git a/generated/Normalizer/ProcessConfigNormalizer.php b/generated/Normalizer/ProcessConfigNormalizer.php index da4ef227..78bf6f30 100644 --- a/generated/Normalizer/ProcessConfigNormalizer.php +++ b/generated/Normalizer/ProcessConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ProcessConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'privileged')) { $object->setPrivileged($data->{'privileged'}); } diff --git a/generated/Normalizer/ProgressDetailNormalizer.php b/generated/Normalizer/ProgressDetailNormalizer.php index 1b7962be..e6ac212e 100644 --- a/generated/Normalizer/ProgressDetailNormalizer.php +++ b/generated/Normalizer/ProgressDetailNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ProgressDetail(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'code')) { $object->setCode($data->{'code'}); } diff --git a/generated/Normalizer/PushImageInfoNormalizer.php b/generated/Normalizer/PushImageInfoNormalizer.php index 99f84a17..3b3afea2 100644 --- a/generated/Normalizer/PushImageInfoNormalizer.php +++ b/generated/Normalizer/PushImageInfoNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\PushImageInfo(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'error')) { $object->setError($data->{'error'}); } diff --git a/generated/Normalizer/RegistryConfigNormalizer.php b/generated/Normalizer/RegistryConfigNormalizer.php index 841c7e35..fb07af8b 100644 --- a/generated/Normalizer/RegistryConfigNormalizer.php +++ b/generated/Normalizer/RegistryConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\RegistryConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'IndexConfigs')) { $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($data->{'IndexConfigs'} as $key => $value) { diff --git a/generated/Normalizer/RegistryNormalizer.php b/generated/Normalizer/RegistryNormalizer.php index 66f5f34e..7dc8f372 100644 --- a/generated/Normalizer/RegistryNormalizer.php +++ b/generated/Normalizer/RegistryNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Registry(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Mirrors')) { $value = $data->{'Mirrors'}; if (is_array($data->{'Mirrors'})) { diff --git a/generated/Normalizer/ReplicatedServiceNormalizer.php b/generated/Normalizer/ReplicatedServiceNormalizer.php index db09439c..4d21d14b 100644 --- a/generated/Normalizer/ReplicatedServiceNormalizer.php +++ b/generated/Normalizer/ReplicatedServiceNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ReplicatedService(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Replicas')) { $object->setReplicas($data->{'Replicas'}); } diff --git a/generated/Normalizer/ResourceUpdateNormalizer.php b/generated/Normalizer/ResourceUpdateNormalizer.php index 59d624fe..213c9b1b 100644 --- a/generated/Normalizer/ResourceUpdateNormalizer.php +++ b/generated/Normalizer/ResourceUpdateNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ResourceUpdate(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'BlkioWeight')) { $object->setBlkioWeight($data->{'BlkioWeight'}); } diff --git a/generated/Normalizer/RestartPolicyNormalizer.php b/generated/Normalizer/RestartPolicyNormalizer.php index 3a6806de..b52d8cd9 100644 --- a/generated/Normalizer/RestartPolicyNormalizer.php +++ b/generated/Normalizer/RestartPolicyNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\RestartPolicy(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/ServiceCreateResponseNormalizer.php b/generated/Normalizer/ServiceCreateResponseNormalizer.php index e5180307..d769ae36 100644 --- a/generated/Normalizer/ServiceCreateResponseNormalizer.php +++ b/generated/Normalizer/ServiceCreateResponseNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ServiceCreateResponse(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Id')) { $object->setId($data->{'Id'}); } diff --git a/generated/Normalizer/ServiceNormalizer.php b/generated/Normalizer/ServiceNormalizer.php index c8723f72..2642f150 100644 --- a/generated/Normalizer/ServiceNormalizer.php +++ b/generated/Normalizer/ServiceNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Service(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'ID')) { $object->setID($data->{'ID'}); } diff --git a/generated/Normalizer/ServiceSpecModeNormalizer.php b/generated/Normalizer/ServiceSpecModeNormalizer.php index 960f503b..dee5a98a 100644 --- a/generated/Normalizer/ServiceSpecModeNormalizer.php +++ b/generated/Normalizer/ServiceSpecModeNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ServiceSpecMode(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Replicated')) { $object->setReplicated($this->serializer->deserialize($data->{'Replicated'}, 'Docker\\API\\Model\\ReplicatedService', 'raw', $context)); } diff --git a/generated/Normalizer/ServiceSpecNormalizer.php b/generated/Normalizer/ServiceSpecNormalizer.php index f22da9b1..5bd6026e 100644 --- a/generated/Normalizer/ServiceSpecNormalizer.php +++ b/generated/Normalizer/ServiceSpecNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\ServiceSpec(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/SwarmConfigNormalizer.php b/generated/Normalizer/SwarmConfigNormalizer.php index 5c9f7dc2..7a558ac6 100644 --- a/generated/Normalizer/SwarmConfigNormalizer.php +++ b/generated/Normalizer/SwarmConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'ListenAddr')) { $object->setListenAddr($data->{'ListenAddr'}); } diff --git a/generated/Normalizer/SwarmConfigSpecCAConfigExternalCANormalizer.php b/generated/Normalizer/SwarmConfigSpecCAConfigExternalCANormalizer.php index d6f559d5..7d46d046 100644 --- a/generated/Normalizer/SwarmConfigSpecCAConfigExternalCANormalizer.php +++ b/generated/Normalizer/SwarmConfigSpecCAConfigExternalCANormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmConfigSpecCAConfigExternalCA(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Protocol')) { $object->setProtocol($data->{'Protocol'}); } diff --git a/generated/Normalizer/SwarmConfigSpecCAConfigNormalizer.php b/generated/Normalizer/SwarmConfigSpecCAConfigNormalizer.php index 9c9584eb..b7db0b7c 100644 --- a/generated/Normalizer/SwarmConfigSpecCAConfigNormalizer.php +++ b/generated/Normalizer/SwarmConfigSpecCAConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmConfigSpecCAConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'NodeCertExpiry')) { $object->setNodeCertExpiry($data->{'NodeCertExpiry'}); } diff --git a/generated/Normalizer/SwarmConfigSpecDispatcherNormalizer.php b/generated/Normalizer/SwarmConfigSpecDispatcherNormalizer.php index a9e634d4..396a850a 100644 --- a/generated/Normalizer/SwarmConfigSpecDispatcherNormalizer.php +++ b/generated/Normalizer/SwarmConfigSpecDispatcherNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmConfigSpecDispatcher(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'HeartbeatPeriod')) { $object->setHeartbeatPeriod($data->{'HeartbeatPeriod'}); } diff --git a/generated/Normalizer/SwarmConfigSpecNormalizer.php b/generated/Normalizer/SwarmConfigSpecNormalizer.php index 2d99fcbf..f61e404d 100644 --- a/generated/Normalizer/SwarmConfigSpecNormalizer.php +++ b/generated/Normalizer/SwarmConfigSpecNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmConfigSpec(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Orchestration')) { $object->setOrchestration($this->serializer->deserialize($data->{'Orchestration'}, 'Docker\\API\\Model\\SwarmConfigSpecOrchestration', 'raw', $context)); } diff --git a/generated/Normalizer/SwarmConfigSpecOrchestrationNormalizer.php b/generated/Normalizer/SwarmConfigSpecOrchestrationNormalizer.php index 64919e42..3bb48ea9 100644 --- a/generated/Normalizer/SwarmConfigSpecOrchestrationNormalizer.php +++ b/generated/Normalizer/SwarmConfigSpecOrchestrationNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmConfigSpecOrchestration(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'TaskHistoryRetentionLimit')) { $object->setTaskHistoryRetentionLimit($data->{'TaskHistoryRetentionLimit'}); } diff --git a/generated/Normalizer/SwarmConfigSpecRaftNormalizer.php b/generated/Normalizer/SwarmConfigSpecRaftNormalizer.php index e3c4e2f9..6dc0bd18 100644 --- a/generated/Normalizer/SwarmConfigSpecRaftNormalizer.php +++ b/generated/Normalizer/SwarmConfigSpecRaftNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmConfigSpecRaft(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'SnapshotInterval')) { $object->setSnapshotInterval($data->{'SnapshotInterval'}); } diff --git a/generated/Normalizer/SwarmIPAMOptionsNormalizer.php b/generated/Normalizer/SwarmIPAMOptionsNormalizer.php index 066f30a5..375534f9 100644 --- a/generated/Normalizer/SwarmIPAMOptionsNormalizer.php +++ b/generated/Normalizer/SwarmIPAMOptionsNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmIPAMOptions(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Driver')) { $object->setDriver($this->serializer->deserialize($data->{'Driver'}, 'Docker\\API\\Model\\Driver', 'raw', $context)); } diff --git a/generated/Normalizer/SwarmJoinConfigNormalizer.php b/generated/Normalizer/SwarmJoinConfigNormalizer.php index d279b804..eeacc3fc 100644 --- a/generated/Normalizer/SwarmJoinConfigNormalizer.php +++ b/generated/Normalizer/SwarmJoinConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmJoinConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'ListenAddr')) { $object->setListenAddr($data->{'ListenAddr'}); } diff --git a/generated/Normalizer/SwarmJoinTokensNormalizer.php b/generated/Normalizer/SwarmJoinTokensNormalizer.php index 9b4180a2..d66046ad 100644 --- a/generated/Normalizer/SwarmJoinTokensNormalizer.php +++ b/generated/Normalizer/SwarmJoinTokensNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmJoinTokens(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Worker')) { $object->setWorker($data->{'Worker'}); } diff --git a/generated/Normalizer/SwarmNetworkNormalizer.php b/generated/Normalizer/SwarmNetworkNormalizer.php index e01ddd33..755c9b46 100644 --- a/generated/Normalizer/SwarmNetworkNormalizer.php +++ b/generated/Normalizer/SwarmNetworkNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmNetwork(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'ID')) { $object->setID($data->{'ID'}); } diff --git a/generated/Normalizer/SwarmNetworkSpecNormalizer.php b/generated/Normalizer/SwarmNetworkSpecNormalizer.php index 6f70300a..84b96d73 100644 --- a/generated/Normalizer/SwarmNetworkSpecNormalizer.php +++ b/generated/Normalizer/SwarmNetworkSpecNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmNetworkSpec(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/SwarmUpdateConfigNormalizer.php b/generated/Normalizer/SwarmUpdateConfigNormalizer.php index ffd5530f..779e2de8 100644 --- a/generated/Normalizer/SwarmUpdateConfigNormalizer.php +++ b/generated/Normalizer/SwarmUpdateConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SwarmUpdateConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/SystemInformationNormalizer.php b/generated/Normalizer/SystemInformationNormalizer.php index 047f61ef..ed5c9d35 100644 --- a/generated/Normalizer/SystemInformationNormalizer.php +++ b/generated/Normalizer/SystemInformationNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\SystemInformation(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Architecture')) { $object->setArchitecture($data->{'Architecture'}); } diff --git a/generated/Normalizer/TaskNormalizer.php b/generated/Normalizer/TaskNormalizer.php index 66636009..c6c1aa90 100644 --- a/generated/Normalizer/TaskNormalizer.php +++ b/generated/Normalizer/TaskNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Task(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'ID')) { $object->setID($data->{'ID'}); } diff --git a/generated/Normalizer/TaskSpecNormalizer.php b/generated/Normalizer/TaskSpecNormalizer.php index 5479b1a1..47641335 100644 --- a/generated/Normalizer/TaskSpecNormalizer.php +++ b/generated/Normalizer/TaskSpecNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\TaskSpec(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'ContainerSpec')) { $object->setContainerSpec($this->serializer->deserialize($data->{'ContainerSpec'}, 'Docker\\API\\Model\\ContainerSpec', 'raw', $context)); } diff --git a/generated/Normalizer/TaskSpecPlacementNormalizer.php b/generated/Normalizer/TaskSpecPlacementNormalizer.php index 27e45325..ea36a7a4 100644 --- a/generated/Normalizer/TaskSpecPlacementNormalizer.php +++ b/generated/Normalizer/TaskSpecPlacementNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\TaskSpecPlacement(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Constraints')) { $value = $data->{'Constraints'}; if (is_array($data->{'Constraints'})) { diff --git a/generated/Normalizer/TaskSpecResourceRequirementsNormalizer.php b/generated/Normalizer/TaskSpecResourceRequirementsNormalizer.php index 3d389461..9600c590 100644 --- a/generated/Normalizer/TaskSpecResourceRequirementsNormalizer.php +++ b/generated/Normalizer/TaskSpecResourceRequirementsNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\TaskSpecResourceRequirements(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Limits')) { $object->setLimits($this->serializer->deserialize($data->{'Limits'}, 'Docker\\API\\Model\\NodeResources', 'raw', $context)); } diff --git a/generated/Normalizer/TaskSpecRestartPolicyNormalizer.php b/generated/Normalizer/TaskSpecRestartPolicyNormalizer.php index 625daa80..37bd8338 100644 --- a/generated/Normalizer/TaskSpecRestartPolicyNormalizer.php +++ b/generated/Normalizer/TaskSpecRestartPolicyNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\TaskSpecRestartPolicy(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Condition')) { $object->setCondition($data->{'Condition'}); } diff --git a/generated/Normalizer/TaskStatusNormalizer.php b/generated/Normalizer/TaskStatusNormalizer.php index 293cfd03..71225b60 100644 --- a/generated/Normalizer/TaskStatusNormalizer.php +++ b/generated/Normalizer/TaskStatusNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\TaskStatus(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Timestamp')) { $object->setTimestamp($data->{'Timestamp'}); } diff --git a/generated/Normalizer/UlimitNormalizer.php b/generated/Normalizer/UlimitNormalizer.php index b89d1672..4d8f85a1 100644 --- a/generated/Normalizer/UlimitNormalizer.php +++ b/generated/Normalizer/UlimitNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Ulimit(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/UpdateConfigNormalizer.php b/generated/Normalizer/UpdateConfigNormalizer.php index 7735a77a..2656dbf5 100644 --- a/generated/Normalizer/UpdateConfigNormalizer.php +++ b/generated/Normalizer/UpdateConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\UpdateConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Parallelism')) { $object->setParallelism($data->{'Parallelism'}); } diff --git a/generated/Normalizer/UpdateStatusNormalizer.php b/generated/Normalizer/UpdateStatusNormalizer.php index 6569be1f..94785c9d 100644 --- a/generated/Normalizer/UpdateStatusNormalizer.php +++ b/generated/Normalizer/UpdateStatusNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\UpdateStatus(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'State')) { $object->setState($data->{'State'}); } diff --git a/generated/Normalizer/VersionNormalizer.php b/generated/Normalizer/VersionNormalizer.php index 69166962..ee5be29e 100644 --- a/generated/Normalizer/VersionNormalizer.php +++ b/generated/Normalizer/VersionNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Version(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Version')) { $object->setVersion($data->{'Version'}); } diff --git a/generated/Normalizer/VolumeConfigNormalizer.php b/generated/Normalizer/VolumeConfigNormalizer.php index 7aacb918..d1d0fc4c 100644 --- a/generated/Normalizer/VolumeConfigNormalizer.php +++ b/generated/Normalizer/VolumeConfigNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\VolumeConfig(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Normalizer/VolumeListNormalizer.php b/generated/Normalizer/VolumeListNormalizer.php index 58cf5953..3af713bb 100644 --- a/generated/Normalizer/VolumeListNormalizer.php +++ b/generated/Normalizer/VolumeListNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\VolumeList(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Volumes')) { $value = $data->{'Volumes'}; if (is_array($data->{'Volumes'})) { diff --git a/generated/Normalizer/VolumeNormalizer.php b/generated/Normalizer/VolumeNormalizer.php index e0477efb..52894207 100644 --- a/generated/Normalizer/VolumeNormalizer.php +++ b/generated/Normalizer/VolumeNormalizer.php @@ -2,7 +2,6 @@ namespace Docker\API\Normalizer; -use Joli\Jane\Reference\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; @@ -29,16 +28,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = []) { - if (empty($data)) { - return null; - } - if (isset($data->{'$ref'})) { - return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null); - } $object = new \Docker\API\Model\Volume(); - if (!isset($context['rootSchema'])) { - $context['rootSchema'] = $object; - } if (property_exists($data, 'Name')) { $object->setName($data->{'Name'}); } diff --git a/generated/Resource/ContainerResource.php b/generated/Resource/ContainerResource.php index 6afd6386..bd6ce209 100644 --- a/generated/Resource/ContainerResource.php +++ b/generated/Resource/ContainerResource.php @@ -33,12 +33,16 @@ public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) $queryParam->setDefault('before', null); $queryParam->setDefault('size', null); $queryParam->setDefault('filters', null); - $url = '/containers/json'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/json'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ContainerInfo[]', 'json'); @@ -68,12 +72,16 @@ public function create(\Docker\API\Model\ContainerConfig $container, $parameters $queryParam->setDefault('name', null); $queryParam->setDefault('Content-Type', 'application/json'); $queryParam->setHeaderParameters(['Content-Type']); - $url = '/containers/create'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($container, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/create'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($container, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('201' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ContainerCreateResult', 'json'); @@ -101,7 +109,11 @@ public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Container', 'json'); @@ -128,13 +140,17 @@ public function listProcesses($id, $parameters = [], $fetch = self::FETCH_OBJECT { $queryParam = new QueryParam(); $queryParam->setDefault('ps_args', null); - $url = '/containers/{id}/top'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/top'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ContainerTop', 'json'); @@ -171,13 +187,17 @@ public function logs($id, $parameters = [], $fetch = self::FETCH_OBJECT) $queryParam->setDefault('since', 0); $queryParam->setDefault('timestamps', false); $queryParam->setDefault('tail', null); - $url = '/containers/{id}/logs'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/logs'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -199,13 +219,17 @@ public function changes($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('kind', null); - $url = '/containers/{id}/changes'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/changes'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ContainerChange[]', 'json'); @@ -233,7 +257,11 @@ public function export($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -255,13 +283,17 @@ public function stats($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('stream', null); - $url = '/containers/{id}/stats'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/stats'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -285,13 +317,17 @@ public function resize($id, $parameters = [], $fetch = self::FETCH_OBJECT) $queryParam = new QueryParam(); $queryParam->setDefault('h', null); $queryParam->setDefault('w', null); - $url = '/containers/{id}/resize'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/resize'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -313,13 +349,17 @@ public function start($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('detachKeys', null); - $url = '/containers/{id}/start'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/start'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -341,13 +381,17 @@ public function stop($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('t', null); - $url = '/containers/{id}/stop'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/stop'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -369,13 +413,17 @@ public function restart($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('t', null); - $url = '/containers/{id}/restart'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/restart'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -397,13 +445,17 @@ public function kill($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('signal', null); - $url = '/containers/{id}/kill'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/kill'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -427,7 +479,11 @@ public function update($id, \Docker\API\Model\ResourceUpdate $resourceConfig, $p $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $this->serializer->serialize($resourceConfig, 'json'); $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ContainerUpdateResult', 'json'); @@ -454,13 +510,17 @@ public function rename($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setRequired('name'); - $url = '/containers/{id}/rename'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/rename'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -483,7 +543,11 @@ public function pause($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -506,7 +570,11 @@ public function unpause($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -538,13 +606,17 @@ public function attach($id, $parameters = [], $fetch = self::FETCH_OBJECT) $queryParam->setDefault('stdout', null); $queryParam->setDefault('stderr', null); $queryParam->setDefault('detachKeys', null); - $url = '/containers/{id}/attach'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/attach'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -576,13 +648,17 @@ public function attachWebsocket($id, $parameters = [], $fetch = self::FETCH_OBJE $queryParam->setDefault('stdout', null); $queryParam->setDefault('stderr', null); $queryParam->setDefault('detachKeys', null); - $url = '/containers/{id}/attach/ws'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/attach/ws'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -605,7 +681,11 @@ public function wait($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ContainerWait', 'json'); @@ -634,13 +714,17 @@ public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) $queryParam = new QueryParam(); $queryParam->setDefault('v', null); $queryParam->setDefault('force', null); - $url = '/containers/{id}'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('DELETE', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('DELETE', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -662,13 +746,17 @@ public function getArchive($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setRequired('path'); - $url = '/containers/{id}/archive'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/archive'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -690,13 +778,17 @@ public function getArchiveInformation($id, $parameters = [], $fetch = self::FETC { $queryParam = new QueryParam(); $queryParam->setRequired('path'); - $url = '/containers/{id}/archive'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('HEAD', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/archive'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('HEAD', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -721,13 +813,17 @@ public function putArchive($id, $inputStream, $parameters = [], $fetch = self::F $queryParam = new QueryParam(); $queryParam->setRequired('path'); $queryParam->setDefault('noOverwriteDirNonDir', null); - $url = '/containers/{id}/archive'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $inputStream; - $request = $this->messageFactory->createRequest('PUT', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/archive'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $inputStream; + $request = $this->messageFactory->createRequest('PUT', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } diff --git a/generated/Resource/ExecResource.php b/generated/Resource/ExecResource.php index 5951db0c..304425d4 100644 --- a/generated/Resource/ExecResource.php +++ b/generated/Resource/ExecResource.php @@ -26,13 +26,17 @@ public function create($id, \Docker\API\Model\ExecConfig $execConfig, $parameter $queryParam = new QueryParam(); $queryParam->setDefault('Content-Type', 'application/json'); $queryParam->setHeaderParameters(['Content-Type']); - $url = '/containers/{id}/exec'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($execConfig, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/containers/{id}/exec'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($execConfig, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('201' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ExecCreateResult', 'json'); @@ -61,13 +65,17 @@ public function start($id, \Docker\API\Model\ExecStartConfig $execStartConfig, $ $queryParam = new QueryParam(); $queryParam->setDefault('Content-Type', 'application/json'); $queryParam->setHeaderParameters(['Content-Type']); - $url = '/exec/{id}/start'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($execStartConfig, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/exec/{id}/start'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($execStartConfig, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -91,13 +99,17 @@ public function resize($id, $parameters = [], $fetch = self::FETCH_OBJECT) $queryParam = new QueryParam(); $queryParam->setDefault('h', null); $queryParam->setDefault('w', null); - $url = '/exec/{id}/resize'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/exec/{id}/resize'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -120,7 +132,11 @@ public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ExecCommand', 'json'); diff --git a/generated/Resource/ImageResource.php b/generated/Resource/ImageResource.php index c76333cc..54267146 100644 --- a/generated/Resource/ImageResource.php +++ b/generated/Resource/ImageResource.php @@ -29,12 +29,16 @@ public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) $queryParam->setDefault('filters', null); $queryParam->setDefault('filter', null); $queryParam->setDefault('digests', null); - $url = '/images/json'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/images/json'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ImageItem[]', 'json'); @@ -95,12 +99,16 @@ public function build($inputStream, $parameters = [], $fetch = self::FETCH_OBJEC $queryParam->setHeaderParameters(['Content-type']); $queryParam->setDefault('X-Registry-Config', null); $queryParam->setHeaderParameters(['X-Registry-Config']); - $url = '/build'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $inputStream; - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/build'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $inputStream; + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -131,12 +139,16 @@ public function create($inputImage, $parameters = [], $fetch = self::FETCH_OBJEC $queryParam->setDefault('tag', null); $queryParam->setDefault('X-Registry-Auth', null); $queryParam->setHeaderParameters(['X-Registry-Auth']); - $url = '/images/create'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $inputImage; - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/images/create'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $inputImage; + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -159,7 +171,11 @@ public function find($name, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Image', 'json'); @@ -187,7 +203,11 @@ public function history($name, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ImageHistoryItem[]', 'json'); @@ -217,13 +237,17 @@ public function push($name, $parameters = [], $fetch = self::FETCH_OBJECT) $queryParam->setDefault('tag', null); $queryParam->setRequired('X-Registry-Auth'); $queryParam->setHeaderParameters(['X-Registry-Auth']); - $url = '/images/{name}/push'; - $url = str_replace('{name}', urlencode($name), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/images/{name}/push'; + $url = str_replace('{name}', urlencode($name), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -247,13 +271,17 @@ public function tag($name, $parameters = [], $fetch = self::FETCH_OBJECT) $queryParam = new QueryParam(); $queryParam->setDefault('repo', null); $queryParam->setDefault('tag', null); - $url = '/images/{name}/tag'; - $url = str_replace('{name}', urlencode($name), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/images/{name}/tag'; + $url = str_replace('{name}', urlencode($name), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -277,13 +305,17 @@ public function remove($name, $parameters = [], $fetch = self::FETCH_OBJECT) $queryParam = new QueryParam(); $queryParam->setDefault('force', null); $queryParam->setDefault('noprune', null); - $url = '/images/{name}'; - $url = str_replace('{name}', urlencode($name), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('DELETE', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/images/{name}'; + $url = str_replace('{name}', urlencode($name), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('DELETE', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -308,12 +340,16 @@ public function search($parameters = [], $fetch = self::FETCH_OBJECT) $queryParam->setDefault('term', null); $queryParam->setDefault('limit', null); $queryParam->setDefault('filters', null); - $url = '/images/search'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/images/search'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ImageSearchResult[]', 'json'); @@ -355,12 +391,16 @@ public function commit(\Docker\API\Model\ContainerConfig $containerConfig, $para $queryParam->setDefault('changes', null); $queryParam->setDefault('Content-Type', 'application/json'); $queryParam->setHeaderParameters(['Content-Type']); - $url = '/commit'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($containerConfig, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/commit'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($containerConfig, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('201' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\CommitResult', 'json'); @@ -388,7 +428,11 @@ public function save($name, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -409,12 +453,16 @@ public function saveAll($parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('names', null); - $url = '/images/get'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/images/get'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -436,7 +484,11 @@ public function load($imagesTarball, $parameters = [], $fetch = self::FETCH_OBJE $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $imagesTarball; $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } diff --git a/generated/Resource/MiscResource.php b/generated/Resource/MiscResource.php index f2c1c45a..0bb30dfb 100644 --- a/generated/Resource/MiscResource.php +++ b/generated/Resource/MiscResource.php @@ -24,7 +24,11 @@ public function checkAuthentication(\Docker\API\Model\AuthConfig $authConfig, $p $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $this->serializer->serialize($authConfig, 'json'); $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\AuthResult', 'json'); @@ -50,7 +54,11 @@ public function getSystemInformation($parameters = [], $fetch = self::FETCH_OBJE $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\SystemInformation', 'json'); @@ -76,7 +84,11 @@ public function getVersion($parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Version', 'json'); @@ -102,7 +114,11 @@ public function ping($parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -127,12 +143,16 @@ public function getEvents($parameters = [], $fetch = self::FETCH_OBJECT) $queryParam->setDefault('since', null); $queryParam->setDefault('until', null); $queryParam->setDefault('filters', null); - $url = '/events'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/events'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } diff --git a/generated/Resource/NetworkResource.php b/generated/Resource/NetworkResource.php index 9f51484a..0b2d5e5d 100644 --- a/generated/Resource/NetworkResource.php +++ b/generated/Resource/NetworkResource.php @@ -23,12 +23,16 @@ public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('filters', null); - $url = '/networks'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/networks'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Network[]', 'json'); @@ -56,7 +60,11 @@ public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('DELETE', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -79,7 +87,11 @@ public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Network', 'json'); @@ -107,12 +119,16 @@ public function create(\Docker\API\Model\NetworkCreateConfig $networkConfig, $pa $queryParam = new QueryParam(); $queryParam->setDefault('Content-Type', 'application/json'); $queryParam->setHeaderParameters(['Content-Type']); - $url = '/networks/create'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($networkConfig, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/networks/create'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($networkConfig, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('201' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\NetworkCreateResult', 'json'); @@ -141,13 +157,17 @@ public function connect($id, \Docker\API\Model\ContainerConnect $container, $par $queryParam = new QueryParam(); $queryParam->setDefault('Content-Type', 'application/json'); $queryParam->setHeaderParameters(['Content-Type']); - $url = '/networks/{id}/connect'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($container, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/networks/{id}/connect'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($container, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -171,13 +191,17 @@ public function disconnect($id, \Docker\API\Model\ContainerDisconnect $container $queryParam = new QueryParam(); $queryParam->setDefault('Content-Type', 'application/json'); $queryParam->setHeaderParameters(['Content-Type']); - $url = '/networks/{id}/disconnect'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($container, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/networks/{id}/disconnect'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($container, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } diff --git a/generated/Resource/NodeResource.php b/generated/Resource/NodeResource.php index 375320d6..994568b0 100644 --- a/generated/Resource/NodeResource.php +++ b/generated/Resource/NodeResource.php @@ -23,12 +23,16 @@ public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('filters', null); - $url = '/nodes'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/nodes'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Node[]', 'json'); @@ -56,7 +60,11 @@ public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Node', 'json'); diff --git a/generated/Resource/ServiceResource.php b/generated/Resource/ServiceResource.php index df3b0db6..04d7a0c4 100644 --- a/generated/Resource/ServiceResource.php +++ b/generated/Resource/ServiceResource.php @@ -23,12 +23,16 @@ public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('filters', null); - $url = '/services'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/services'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Service[]', 'json'); @@ -55,7 +59,11 @@ public function create(\Docker\API\Model\ServiceSpec $serviceSpec, $parameters = $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $this->serializer->serialize($serviceSpec, 'json'); $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('201' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ServiceCreateResponse', 'json'); @@ -77,13 +85,17 @@ public function create(\Docker\API\Model\ServiceSpec $serviceSpec, $parameters = public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); - $url = '/service/{id}'; + $url = '/services/{id}'; $url = str_replace('{id}', urlencode($id), $url); $url = $url . ('?' . $queryParam->buildQueryString($parameters)); $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('DELETE', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -100,13 +112,17 @@ public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); - $url = '/service/{id}'; + $url = '/services/{id}'; $url = str_replace('{id}', urlencode($id), $url); $url = $url . ('?' . $queryParam->buildQueryString($parameters)); $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Service', 'json'); @@ -134,13 +150,17 @@ public function update($id, \Docker\API\Model\ServiceSpec $serviceSpec, $paramet { $queryParam = new QueryParam(); $queryParam->setRequired('version'); - $url = '/services/{id}/update'; - $url = str_replace('{id}', urlencode($id), $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($serviceSpec, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/services/{id}/update'; + $url = str_replace('{id}', urlencode($id), $url); + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($serviceSpec, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } diff --git a/generated/Resource/SwarmResource.php b/generated/Resource/SwarmResource.php index 721e0540..5bd102e7 100644 --- a/generated/Resource/SwarmResource.php +++ b/generated/Resource/SwarmResource.php @@ -24,7 +24,11 @@ public function initialize(\Docker\API\Model\SwarmConfig $swarmConfig, $paramete $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $this->serializer->serialize($swarmConfig, 'json'); $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -46,7 +50,11 @@ public function join(\Docker\API\Model\SwarmJoinConfig $swarmJoinConfig, $parame $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $this->serializer->serialize($swarmJoinConfig, 'json'); $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -67,7 +75,11 @@ public function leave($parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -93,12 +105,16 @@ public function update(\Docker\API\Model\SwarmUpdateConfig $swarmUpdateConfig, $ $queryParam->setRequired('version'); $queryParam->setDefault('rotateWorkerToken', null); $queryParam->setDefault('rotateManagerToken', null); - $url = '/swarm/update'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($swarmUpdateConfig, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/swarm/update'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($swarmUpdateConfig, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } diff --git a/generated/Resource/TaskResource.php b/generated/Resource/TaskResource.php index 9f841ed7..99b9011c 100644 --- a/generated/Resource/TaskResource.php +++ b/generated/Resource/TaskResource.php @@ -23,12 +23,16 @@ public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('filters', null); - $url = '/tasks'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/tasks'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Task[]', 'json'); @@ -56,7 +60,11 @@ public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Task', 'json'); diff --git a/generated/Resource/VolumeResource.php b/generated/Resource/VolumeResource.php index 1c9d96df..330387a7 100644 --- a/generated/Resource/VolumeResource.php +++ b/generated/Resource/VolumeResource.php @@ -23,12 +23,16 @@ public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) { $queryParam = new QueryParam(); $queryParam->setDefault('filters', null); - $url = '/volumes'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $queryParam->buildFormDataString($parameters); - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/volumes'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $queryParam->buildFormDataString($parameters); + $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\VolumeList', 'json'); @@ -56,12 +60,16 @@ public function create(\Docker\API\Model\VolumeConfig $volumeConfig, $parameters $queryParam = new QueryParam(); $queryParam->setDefault('Content-Type', 'application/json'); $queryParam->setHeaderParameters(['Content-Type']); - $url = '/volumes/create'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->serialize($volumeConfig, 'json'); - $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $url = '/volumes/create'; + $url = $url . ('?' . $queryParam->buildQueryString($parameters)); + $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); + $body = $this->serializer->serialize($volumeConfig, 'json'); + $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('201' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Volume', 'json'); @@ -89,7 +97,11 @@ public function remove($name, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('DELETE', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); return $response; } @@ -112,7 +124,11 @@ public function find($name, $parameters = [], $fetch = self::FETCH_OBJECT) $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); $body = $queryParam->buildFormDataString($parameters); $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $promise = $this->httpClient->sendAsyncRequest($request); + if (self::FETCH_PROMISE === $fetch) { + return $promise; + } + $response = $promise->wait(); if (self::FETCH_OBJECT == $fetch) { if ('200' == $response->getStatusCode()) { return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\Volume', 'json'); diff --git a/tests/Manager/ImageManagerTest.php b/tests/Manager/ImageManagerTest.php index afadda97..20d8c233 100644 --- a/tests/Manager/ImageManagerTest.php +++ b/tests/Manager/ImageManagerTest.php @@ -40,7 +40,7 @@ public function testBuildStream() }); $buildStream->wait(); - $this->assertContains("Successfully built", $lastMessage); + $this->assertContains("Successfully", $lastMessage); } public function testBuildObject() @@ -53,7 +53,7 @@ public function testBuildObject() $buildInfos = $this->getManager()->build($context->read(), ['t' => 'test-image'], ImageManager::FETCH_OBJECT); $this->assertInternalType('array', $buildInfos); - $this->assertContains("Successfully built", $buildInfos[count($buildInfos) - 1]->getStream()); + $this->assertContains("Successfully", $buildInfos[count($buildInfos) - 1]->getStream()); } public function testCreateStream() From 961e1d4f2b5d6617920babe440f585d1d517a763 Mon Sep 17 00:00:00 2001 From: dontub Date: Sat, 21 Oct 2017 12:21:38 +0200 Subject: [PATCH 4/5] Add missing properties to HostConfig (#250) * Add missing properties to HostConfig - Properties added: Tmpfs, MemoryReservation, KernelMemory, and CpuQuota * Update generated HostConfig --- docker-swagger.json | 15 + generated/Model/HostConfig.php | 96 +++ generated/Normalizer/HostConfigNormalizer.php | 654 ++++++++++-------- 3 files changed, 460 insertions(+), 305 deletions(-) diff --git a/docker-swagger.json b/docker-swagger.json index 78ed1c77..63b234cd 100644 --- a/docker-swagger.json +++ b/docker-swagger.json @@ -165,6 +165,12 @@ "type": "string" } }, + "Tmpfs": { + "type": ["object", "null"], + "additionalProperties": { + "type": "string" + } + }, "Links": { "type": ["array", "null"], "items": { @@ -185,12 +191,21 @@ "type": "integer", "default": 0 }, + "MemoryReservation": { + "type": "integer" + }, + "KernelMemory": { + "type": "integer" + }, "CpuShares": { "type": "integer" }, "CpuPeriod": { "type": "integer" }, + "CpuQuota": { + "type": "integer" + }, "CpusetCpus": { "type": "string" }, diff --git a/generated/Model/HostConfig.php b/generated/Model/HostConfig.php index 9b08c63f..ade52465 100644 --- a/generated/Model/HostConfig.php +++ b/generated/Model/HostConfig.php @@ -8,6 +8,10 @@ class HostConfig * @var string[]|null */ protected $binds; + /** + * @var string[]|null + */ + protected $tmpfs; /** * @var string[]|null */ @@ -24,6 +28,14 @@ class HostConfig * @var int */ protected $memorySwap; + /** + * @var int + */ + protected $memoryReservation; + /** + * @var int + */ + protected $kernelMemory; /** * @var int */ @@ -32,6 +44,10 @@ class HostConfig * @var int */ protected $cpuPeriod; + /** + * @var int + */ + protected $cpuQuota; /** * @var string */ @@ -205,6 +221,26 @@ public function setBinds($binds = null) return $this; } + /** + * @return string[]|null + */ + public function getTmpfs() + { + return $this->tmpfs; + } + + /** + * @param string[]|null $tmpfs + * + * @return self + */ + public function setTmpfs($tmpfs = null) + { + $this->tmpfs = $tmpfs; + + return $this; + } + /** * @return string[]|null */ @@ -285,6 +321,46 @@ public function setMemorySwap($memorySwap = null) return $this; } + /** + * @return int + */ + public function getMemoryReservation() + { + return $this->memoryReservation; + } + + /** + * @param int $memoryReservation + * + * @return self + */ + public function setMemoryReservation($memoryReservation = null) + { + $this->memoryReservation = $memoryReservation; + + return $this; + } + + /** + * @return int + */ + public function getKernelMemory() + { + return $this->kernelMemory; + } + + /** + * @param int $kernelMemory + * + * @return self + */ + public function setKernelMemory($kernelMemory = null) + { + $this->kernelMemory = $kernelMemory; + + return $this; + } + /** * @return int */ @@ -325,6 +401,26 @@ public function setCpuPeriod($cpuPeriod = null) return $this; } + /** + * @return int + */ + public function getCpuQuota() + { + return $this->cpuQuota; + } + + /** + * @param int $cpuQuota + * + * @return self + */ + public function setCpuQuota($cpuQuota = null) + { + $this->cpuQuota = $cpuQuota; + + return $this; + } + /** * @return string */ diff --git a/generated/Normalizer/HostConfigNormalizer.php b/generated/Normalizer/HostConfigNormalizer.php index 276a40e9..3b935ba5 100644 --- a/generated/Normalizer/HostConfigNormalizer.php +++ b/generated/Normalizer/HostConfigNormalizer.php @@ -43,33 +43,47 @@ public function denormalize($data, $class, $format = null, array $context = []) } $object->setBinds($value); } + if (property_exists($data, 'Tmpfs')) { + $value_2 = $data->{'Tmpfs'}; + if (is_object($data->{'Tmpfs'})) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data->{'Tmpfs'} as $key => $value_3) { + $values_1[$key] = $value_3; + } + $value_2 = $values_1; + } + if (is_null($data->{'Tmpfs'})) { + $value_2 = $data->{'Tmpfs'}; + } + $object->setTmpfs($value_2); + } if (property_exists($data, 'Links')) { - $value_2 = $data->{'Links'}; + $value_4 = $data->{'Links'}; if (is_array($data->{'Links'})) { - $values_1 = []; - foreach ($data->{'Links'} as $value_3) { - $values_1[] = $value_3; + $values_2 = []; + foreach ($data->{'Links'} as $value_5) { + $values_2[] = $value_5; } - $value_2 = $values_1; + $value_4 = $values_2; } if (is_null($data->{'Links'})) { - $value_2 = $data->{'Links'}; + $value_4 = $data->{'Links'}; } - $object->setLinks($value_2); + $object->setLinks($value_4); } if (property_exists($data, 'LxcConf')) { - $value_4 = $data->{'LxcConf'}; + $value_6 = $data->{'LxcConf'}; if (is_object($data->{'LxcConf'})) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'LxcConf'} as $key => $value_5) { - $values_2[$key] = $value_5; + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data->{'LxcConf'} as $key_1 => $value_7) { + $values_3[$key_1] = $value_7; } - $value_4 = $values_2; + $value_6 = $values_3; } if (is_null($data->{'LxcConf'})) { - $value_4 = $data->{'LxcConf'}; + $value_6 = $data->{'LxcConf'}; } - $object->setLxcConf($value_4); + $object->setLxcConf($value_6); } if (property_exists($data, 'Memory')) { $object->setMemory($data->{'Memory'}); @@ -77,12 +91,21 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'MemorySwap')) { $object->setMemorySwap($data->{'MemorySwap'}); } + if (property_exists($data, 'MemoryReservation')) { + $object->setMemoryReservation($data->{'MemoryReservation'}); + } + if (property_exists($data, 'KernelMemory')) { + $object->setKernelMemory($data->{'KernelMemory'}); + } if (property_exists($data, 'CpuShares')) { $object->setCpuShares($data->{'CpuShares'}); } if (property_exists($data, 'CpuPeriod')) { $object->setCpuPeriod($data->{'CpuPeriod'}); } + if (property_exists($data, 'CpuQuota')) { + $object->setCpuQuota($data->{'CpuQuota'}); + } if (property_exists($data, 'CpusetCpus')) { $object->setCpusetCpus($data->{'CpusetCpus'}); } @@ -99,74 +122,74 @@ public function denormalize($data, $class, $format = null, array $context = []) $object->setBlkioWeight($data->{'BlkioWeight'}); } if (property_exists($data, 'BlkioWeightDevice')) { - $value_6 = $data->{'BlkioWeightDevice'}; + $value_8 = $data->{'BlkioWeightDevice'}; if (is_array($data->{'BlkioWeightDevice'})) { - $values_3 = []; - foreach ($data->{'BlkioWeightDevice'} as $value_7) { - $values_3[] = $this->serializer->deserialize($value_7, 'Docker\\API\\Model\\DeviceWeight', 'raw', $context); + $values_4 = []; + foreach ($data->{'BlkioWeightDevice'} as $value_9) { + $values_4[] = $this->serializer->deserialize($value_9, 'Docker\\API\\Model\\DeviceWeight', 'raw', $context); } - $value_6 = $values_3; + $value_8 = $values_4; } if (is_null($data->{'BlkioWeightDevice'})) { - $value_6 = $data->{'BlkioWeightDevice'}; + $value_8 = $data->{'BlkioWeightDevice'}; } - $object->setBlkioWeightDevice($value_6); + $object->setBlkioWeightDevice($value_8); } if (property_exists($data, 'BlkioDeviceReadBps')) { - $value_8 = $data->{'BlkioDeviceReadBps'}; + $value_10 = $data->{'BlkioDeviceReadBps'}; if (is_array($data->{'BlkioDeviceReadBps'})) { - $values_4 = []; - foreach ($data->{'BlkioDeviceReadBps'} as $value_9) { - $values_4[] = $this->serializer->deserialize($value_9, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); + $values_5 = []; + foreach ($data->{'BlkioDeviceReadBps'} as $value_11) { + $values_5[] = $this->serializer->deserialize($value_11, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); } - $value_8 = $values_4; + $value_10 = $values_5; } if (is_null($data->{'BlkioDeviceReadBps'})) { - $value_8 = $data->{'BlkioDeviceReadBps'}; + $value_10 = $data->{'BlkioDeviceReadBps'}; } - $object->setBlkioDeviceReadBps($value_8); + $object->setBlkioDeviceReadBps($value_10); } if (property_exists($data, 'BlkioDeviceReadIOps')) { - $value_10 = $data->{'BlkioDeviceReadIOps'}; + $value_12 = $data->{'BlkioDeviceReadIOps'}; if (is_array($data->{'BlkioDeviceReadIOps'})) { - $values_5 = []; - foreach ($data->{'BlkioDeviceReadIOps'} as $value_11) { - $values_5[] = $this->serializer->deserialize($value_11, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); + $values_6 = []; + foreach ($data->{'BlkioDeviceReadIOps'} as $value_13) { + $values_6[] = $this->serializer->deserialize($value_13, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); } - $value_10 = $values_5; + $value_12 = $values_6; } if (is_null($data->{'BlkioDeviceReadIOps'})) { - $value_10 = $data->{'BlkioDeviceReadIOps'}; + $value_12 = $data->{'BlkioDeviceReadIOps'}; } - $object->setBlkioDeviceReadIOps($value_10); + $object->setBlkioDeviceReadIOps($value_12); } if (property_exists($data, 'BlkioDeviceWriteBps')) { - $value_12 = $data->{'BlkioDeviceWriteBps'}; + $value_14 = $data->{'BlkioDeviceWriteBps'}; if (is_array($data->{'BlkioDeviceWriteBps'})) { - $values_6 = []; - foreach ($data->{'BlkioDeviceWriteBps'} as $value_13) { - $values_6[] = $this->serializer->deserialize($value_13, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); + $values_7 = []; + foreach ($data->{'BlkioDeviceWriteBps'} as $value_15) { + $values_7[] = $this->serializer->deserialize($value_15, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); } - $value_12 = $values_6; + $value_14 = $values_7; } if (is_null($data->{'BlkioDeviceWriteBps'})) { - $value_12 = $data->{'BlkioDeviceWriteBps'}; + $value_14 = $data->{'BlkioDeviceWriteBps'}; } - $object->setBlkioDeviceWriteBps($value_12); + $object->setBlkioDeviceWriteBps($value_14); } if (property_exists($data, 'BlkioDeviceWriteIOps')) { - $value_14 = $data->{'BlkioDeviceWriteIOps'}; + $value_16 = $data->{'BlkioDeviceWriteIOps'}; if (is_array($data->{'BlkioDeviceWriteIOps'})) { - $values_7 = []; - foreach ($data->{'BlkioDeviceWriteIOps'} as $value_15) { - $values_7[] = $this->serializer->deserialize($value_15, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); + $values_8 = []; + foreach ($data->{'BlkioDeviceWriteIOps'} as $value_17) { + $values_8[] = $this->serializer->deserialize($value_17, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); } - $value_14 = $values_7; + $value_16 = $values_8; } if (is_null($data->{'BlkioDeviceWriteIOps'})) { - $value_14 = $data->{'BlkioDeviceWriteIOps'}; + $value_16 = $data->{'BlkioDeviceWriteIOps'}; } - $object->setBlkioDeviceWriteIOps($value_14); + $object->setBlkioDeviceWriteIOps($value_16); } if (property_exists($data, 'MemorySwappiness')) { $object->setMemorySwappiness($data->{'MemorySwappiness'}); @@ -181,29 +204,29 @@ public function denormalize($data, $class, $format = null, array $context = []) $object->setPidsLimit($data->{'PidsLimit'}); } if (property_exists($data, 'PortBindings')) { - $value_16 = $data->{'PortBindings'}; + $value_18 = $data->{'PortBindings'}; if (is_object($data->{'PortBindings'})) { - $values_8 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'PortBindings'} as $key_1 => $value_17) { - $value_18 = $value_17; - if (is_array($value_17)) { - $values_9 = []; - foreach ($value_17 as $value_19) { - $values_9[] = $this->serializer->deserialize($value_19, 'Docker\\API\\Model\\PortBinding', 'raw', $context); + $values_9 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data->{'PortBindings'} as $key_2 => $value_19) { + $value_20 = $value_19; + if (is_array($value_19)) { + $values_10 = []; + foreach ($value_19 as $value_21) { + $values_10[] = $this->serializer->deserialize($value_21, 'Docker\\API\\Model\\PortBinding', 'raw', $context); } - $value_18 = $values_9; + $value_20 = $values_10; } - if (is_null($value_17)) { - $value_18 = $value_17; + if (is_null($value_19)) { + $value_20 = $value_19; } - $values_8[$key_1] = $value_18; + $values_9[$key_2] = $value_20; } - $value_16 = $values_8; + $value_18 = $values_9; } if (is_null($data->{'PortBindings'})) { - $value_16 = $data->{'PortBindings'}; + $value_18 = $data->{'PortBindings'}; } - $object->setPortBindings($value_16); + $object->setPortBindings($value_18); } if (property_exists($data, 'PublishAllPorts')) { $object->setPublishAllPorts($data->{'PublishAllPorts'}); @@ -215,144 +238,144 @@ public function denormalize($data, $class, $format = null, array $context = []) $object->setReadonlyRootfs($data->{'ReadonlyRootfs'}); } if (property_exists($data, 'Sysctls')) { - $value_20 = $data->{'Sysctls'}; + $value_22 = $data->{'Sysctls'}; if (is_object($data->{'Sysctls'})) { - $values_10 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Sysctls'} as $key_2 => $value_21) { - $values_10[$key_2] = $value_21; + $values_11 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data->{'Sysctls'} as $key_3 => $value_23) { + $values_11[$key_3] = $value_23; } - $value_20 = $values_10; + $value_22 = $values_11; } if (is_null($data->{'Sysctls'})) { - $value_20 = $data->{'Sysctls'}; + $value_22 = $data->{'Sysctls'}; } - $object->setSysctls($value_20); + $object->setSysctls($value_22); } if (property_exists($data, 'StorageOpt')) { - $value_22 = $data->{'StorageOpt'}; + $value_24 = $data->{'StorageOpt'}; if (is_object($data->{'StorageOpt'})) { - $values_11 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'StorageOpt'} as $key_3 => $value_23) { - $values_11[$key_3] = $value_23; + $values_12 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data->{'StorageOpt'} as $key_4 => $value_25) { + $values_12[$key_4] = $value_25; } - $value_22 = $values_11; + $value_24 = $values_12; } if (is_null($data->{'StorageOpt'})) { - $value_22 = $data->{'StorageOpt'}; + $value_24 = $data->{'StorageOpt'}; } - $object->setStorageOpt($value_22); + $object->setStorageOpt($value_24); } if (property_exists($data, 'Dns')) { - $value_24 = $data->{'Dns'}; + $value_26 = $data->{'Dns'}; if (is_array($data->{'Dns'})) { - $values_12 = []; - foreach ($data->{'Dns'} as $value_25) { - $values_12[] = $value_25; + $values_13 = []; + foreach ($data->{'Dns'} as $value_27) { + $values_13[] = $value_27; } - $value_24 = $values_12; + $value_26 = $values_13; } if (is_null($data->{'Dns'})) { - $value_24 = $data->{'Dns'}; + $value_26 = $data->{'Dns'}; } - $object->setDns($value_24); + $object->setDns($value_26); } if (property_exists($data, 'DnsOptions')) { - $value_26 = $data->{'DnsOptions'}; + $value_28 = $data->{'DnsOptions'}; if (is_array($data->{'DnsOptions'})) { - $values_13 = []; - foreach ($data->{'DnsOptions'} as $value_27) { - $values_13[] = $value_27; + $values_14 = []; + foreach ($data->{'DnsOptions'} as $value_29) { + $values_14[] = $value_29; } - $value_26 = $values_13; + $value_28 = $values_14; } if (is_null($data->{'DnsOptions'})) { - $value_26 = $data->{'DnsOptions'}; + $value_28 = $data->{'DnsOptions'}; } - $object->setDnsOptions($value_26); + $object->setDnsOptions($value_28); } if (property_exists($data, 'DnsSearch')) { - $value_28 = $data->{'DnsSearch'}; + $value_30 = $data->{'DnsSearch'}; if (is_array($data->{'DnsSearch'})) { - $values_14 = []; - foreach ($data->{'DnsSearch'} as $value_29) { - $values_14[] = $value_29; + $values_15 = []; + foreach ($data->{'DnsSearch'} as $value_31) { + $values_15[] = $value_31; } - $value_28 = $values_14; + $value_30 = $values_15; } if (is_null($data->{'DnsSearch'})) { - $value_28 = $data->{'DnsSearch'}; + $value_30 = $data->{'DnsSearch'}; } - $object->setDnsSearch($value_28); + $object->setDnsSearch($value_30); } if (property_exists($data, 'ExtraHosts')) { - $value_30 = $data->{'ExtraHosts'}; + $value_32 = $data->{'ExtraHosts'}; if (is_array($data->{'ExtraHosts'})) { - $values_15 = []; - foreach ($data->{'ExtraHosts'} as $value_31) { - $values_15[] = $value_31; + $values_16 = []; + foreach ($data->{'ExtraHosts'} as $value_33) { + $values_16[] = $value_33; } - $value_30 = $values_15; + $value_32 = $values_16; } if (is_null($data->{'ExtraHosts'})) { - $value_30 = $data->{'ExtraHosts'}; + $value_32 = $data->{'ExtraHosts'}; } - $object->setExtraHosts($value_30); + $object->setExtraHosts($value_32); } if (property_exists($data, 'VolumesFrom')) { - $value_32 = $data->{'VolumesFrom'}; + $value_34 = $data->{'VolumesFrom'}; if (is_array($data->{'VolumesFrom'})) { - $values_16 = []; - foreach ($data->{'VolumesFrom'} as $value_33) { - $values_16[] = $value_33; + $values_17 = []; + foreach ($data->{'VolumesFrom'} as $value_35) { + $values_17[] = $value_35; } - $value_32 = $values_16; + $value_34 = $values_17; } if (is_null($data->{'VolumesFrom'})) { - $value_32 = $data->{'VolumesFrom'}; + $value_34 = $data->{'VolumesFrom'}; } - $object->setVolumesFrom($value_32); + $object->setVolumesFrom($value_34); } if (property_exists($data, 'CapAdd')) { - $value_34 = $data->{'CapAdd'}; + $value_36 = $data->{'CapAdd'}; if (is_array($data->{'CapAdd'})) { - $values_17 = []; - foreach ($data->{'CapAdd'} as $value_35) { - $values_17[] = $value_35; + $values_18 = []; + foreach ($data->{'CapAdd'} as $value_37) { + $values_18[] = $value_37; } - $value_34 = $values_17; + $value_36 = $values_18; } if (is_null($data->{'CapAdd'})) { - $value_34 = $data->{'CapAdd'}; + $value_36 = $data->{'CapAdd'}; } - $object->setCapAdd($value_34); + $object->setCapAdd($value_36); } if (property_exists($data, 'CapDrop')) { - $value_36 = $data->{'CapDrop'}; + $value_38 = $data->{'CapDrop'}; if (is_array($data->{'CapDrop'})) { - $values_18 = []; - foreach ($data->{'CapDrop'} as $value_37) { - $values_18[] = $value_37; + $values_19 = []; + foreach ($data->{'CapDrop'} as $value_39) { + $values_19[] = $value_39; } - $value_36 = $values_18; + $value_38 = $values_19; } if (is_null($data->{'CapDrop'})) { - $value_36 = $data->{'CapDrop'}; + $value_38 = $data->{'CapDrop'}; } - $object->setCapDrop($value_36); + $object->setCapDrop($value_38); } if (property_exists($data, 'GroupAdd')) { - $value_38 = $data->{'GroupAdd'}; + $value_40 = $data->{'GroupAdd'}; if (is_array($data->{'GroupAdd'})) { - $values_19 = []; - foreach ($data->{'GroupAdd'} as $value_39) { - $values_19[] = $value_39; + $values_20 = []; + foreach ($data->{'GroupAdd'} as $value_41) { + $values_20[] = $value_41; } - $value_38 = $values_19; + $value_40 = $values_20; } if (is_null($data->{'GroupAdd'})) { - $value_38 = $data->{'GroupAdd'}; + $value_40 = $data->{'GroupAdd'}; } - $object->setGroupAdd($value_38); + $object->setGroupAdd($value_40); } if (property_exists($data, 'RestartPolicy')) { $object->setRestartPolicy($this->serializer->deserialize($data->{'RestartPolicy'}, 'Docker\\API\\Model\\RestartPolicy', 'raw', $context)); @@ -364,46 +387,46 @@ public function denormalize($data, $class, $format = null, array $context = []) $object->setNetworkMode($data->{'NetworkMode'}); } if (property_exists($data, 'Devices')) { - $value_40 = $data->{'Devices'}; + $value_42 = $data->{'Devices'}; if (is_array($data->{'Devices'})) { - $values_20 = []; - foreach ($data->{'Devices'} as $value_41) { - $values_20[] = $this->serializer->deserialize($value_41, 'Docker\\API\\Model\\Device', 'raw', $context); + $values_21 = []; + foreach ($data->{'Devices'} as $value_43) { + $values_21[] = $this->serializer->deserialize($value_43, 'Docker\\API\\Model\\Device', 'raw', $context); } - $value_40 = $values_20; + $value_42 = $values_21; } if (is_null($data->{'Devices'})) { - $value_40 = $data->{'Devices'}; + $value_42 = $data->{'Devices'}; } - $object->setDevices($value_40); + $object->setDevices($value_42); } if (property_exists($data, 'Ulimits')) { - $value_42 = $data->{'Ulimits'}; + $value_44 = $data->{'Ulimits'}; if (is_array($data->{'Ulimits'})) { - $values_21 = []; - foreach ($data->{'Ulimits'} as $value_43) { - $values_21[] = $this->serializer->deserialize($value_43, 'Docker\\API\\Model\\Ulimit', 'raw', $context); + $values_22 = []; + foreach ($data->{'Ulimits'} as $value_45) { + $values_22[] = $this->serializer->deserialize($value_45, 'Docker\\API\\Model\\Ulimit', 'raw', $context); } - $value_42 = $values_21; + $value_44 = $values_22; } if (is_null($data->{'Ulimits'})) { - $value_42 = $data->{'Ulimits'}; + $value_44 = $data->{'Ulimits'}; } - $object->setUlimits($value_42); + $object->setUlimits($value_44); } if (property_exists($data, 'SecurityOpt')) { - $value_44 = $data->{'SecurityOpt'}; + $value_46 = $data->{'SecurityOpt'}; if (is_array($data->{'SecurityOpt'})) { - $values_22 = []; - foreach ($data->{'SecurityOpt'} as $value_45) { - $values_22[] = $value_45; + $values_23 = []; + foreach ($data->{'SecurityOpt'} as $value_47) { + $values_23[] = $value_47; } - $value_44 = $values_22; + $value_46 = $values_23; } if (is_null($data->{'SecurityOpt'})) { - $value_44 = $data->{'SecurityOpt'}; + $value_46 = $data->{'SecurityOpt'}; } - $object->setSecurityOpt($value_44); + $object->setSecurityOpt($value_46); } if (property_exists($data, 'LogConfig')) { $object->setLogConfig($this->serializer->deserialize($data->{'LogConfig'}, 'Docker\\API\\Model\\LogConfig', 'raw', $context)); @@ -436,42 +459,63 @@ public function normalize($object, $format = null, array $context = []) $value = $object->getBinds(); } $data->{'Binds'} = $value; - $value_2 = $object->getLinks(); - if (is_array($object->getLinks())) { - $values_1 = []; - foreach ($object->getLinks() as $value_3) { - $values_1[] = $value_3; + $value_2 = $object->getTmpfs(); + if (is_object($object->getTmpfs())) { + $values_1 = new \stdClass(); + foreach ($object->getTmpfs() as $key => $value_3) { + $values_1->{$key} = $value_3; } $value_2 = $values_1; } + if (is_null($object->getTmpfs())) { + $value_2 = $object->getTmpfs(); + } + $data->{'Tmpfs'} = $value_2; + $value_4 = $object->getLinks(); + if (is_array($object->getLinks())) { + $values_2 = []; + foreach ($object->getLinks() as $value_5) { + $values_2[] = $value_5; + } + $value_4 = $values_2; + } if (is_null($object->getLinks())) { - $value_2 = $object->getLinks(); + $value_4 = $object->getLinks(); } - $data->{'Links'} = $value_2; - $value_4 = $object->getLxcConf(); + $data->{'Links'} = $value_4; + $value_6 = $object->getLxcConf(); if (is_object($object->getLxcConf())) { - $values_2 = new \stdClass(); - foreach ($object->getLxcConf() as $key => $value_5) { - $values_2->{$key} = $value_5; + $values_3 = new \stdClass(); + foreach ($object->getLxcConf() as $key_1 => $value_7) { + $values_3->{$key_1} = $value_7; } - $value_4 = $values_2; + $value_6 = $values_3; } if (is_null($object->getLxcConf())) { - $value_4 = $object->getLxcConf(); + $value_6 = $object->getLxcConf(); } - $data->{'LxcConf'} = $value_4; + $data->{'LxcConf'} = $value_6; if (null !== $object->getMemory()) { $data->{'Memory'} = $object->getMemory(); } if (null !== $object->getMemorySwap()) { $data->{'MemorySwap'} = $object->getMemorySwap(); } + if (null !== $object->getMemoryReservation()) { + $data->{'MemoryReservation'} = $object->getMemoryReservation(); + } + if (null !== $object->getKernelMemory()) { + $data->{'KernelMemory'} = $object->getKernelMemory(); + } if (null !== $object->getCpuShares()) { $data->{'CpuShares'} = $object->getCpuShares(); } if (null !== $object->getCpuPeriod()) { $data->{'CpuPeriod'} = $object->getCpuPeriod(); } + if (null !== $object->getCpuQuota()) { + $data->{'CpuQuota'} = $object->getCpuQuota(); + } if (null !== $object->getCpusetCpus()) { $data->{'CpusetCpus'} = $object->getCpusetCpus(); } @@ -487,66 +531,66 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getBlkioWeight()) { $data->{'BlkioWeight'} = $object->getBlkioWeight(); } - $value_6 = $object->getBlkioWeightDevice(); + $value_8 = $object->getBlkioWeightDevice(); if (is_array($object->getBlkioWeightDevice())) { - $values_3 = []; - foreach ($object->getBlkioWeightDevice() as $value_7) { - $values_3[] = $this->serializer->serialize($value_7, 'raw', $context); - } - $value_6 = $values_3; - } - if (is_null($object->getBlkioWeightDevice())) { - $value_6 = $object->getBlkioWeightDevice(); - } - $data->{'BlkioWeightDevice'} = $value_6; - $value_8 = $object->getBlkioDeviceReadBps(); - if (is_array($object->getBlkioDeviceReadBps())) { $values_4 = []; - foreach ($object->getBlkioDeviceReadBps() as $value_9) { + foreach ($object->getBlkioWeightDevice() as $value_9) { $values_4[] = $this->serializer->serialize($value_9, 'raw', $context); } $value_8 = $values_4; } - if (is_null($object->getBlkioDeviceReadBps())) { - $value_8 = $object->getBlkioDeviceReadBps(); + if (is_null($object->getBlkioWeightDevice())) { + $value_8 = $object->getBlkioWeightDevice(); } - $data->{'BlkioDeviceReadBps'} = $value_8; - $value_10 = $object->getBlkioDeviceReadIOps(); - if (is_array($object->getBlkioDeviceReadIOps())) { + $data->{'BlkioWeightDevice'} = $value_8; + $value_10 = $object->getBlkioDeviceReadBps(); + if (is_array($object->getBlkioDeviceReadBps())) { $values_5 = []; - foreach ($object->getBlkioDeviceReadIOps() as $value_11) { + foreach ($object->getBlkioDeviceReadBps() as $value_11) { $values_5[] = $this->serializer->serialize($value_11, 'raw', $context); } $value_10 = $values_5; } - if (is_null($object->getBlkioDeviceReadIOps())) { - $value_10 = $object->getBlkioDeviceReadIOps(); + if (is_null($object->getBlkioDeviceReadBps())) { + $value_10 = $object->getBlkioDeviceReadBps(); } - $data->{'BlkioDeviceReadIOps'} = $value_10; - $value_12 = $object->getBlkioDeviceWriteBps(); - if (is_array($object->getBlkioDeviceWriteBps())) { + $data->{'BlkioDeviceReadBps'} = $value_10; + $value_12 = $object->getBlkioDeviceReadIOps(); + if (is_array($object->getBlkioDeviceReadIOps())) { $values_6 = []; - foreach ($object->getBlkioDeviceWriteBps() as $value_13) { + foreach ($object->getBlkioDeviceReadIOps() as $value_13) { $values_6[] = $this->serializer->serialize($value_13, 'raw', $context); } $value_12 = $values_6; } - if (is_null($object->getBlkioDeviceWriteBps())) { - $value_12 = $object->getBlkioDeviceWriteBps(); + if (is_null($object->getBlkioDeviceReadIOps())) { + $value_12 = $object->getBlkioDeviceReadIOps(); } - $data->{'BlkioDeviceWriteBps'} = $value_12; - $value_14 = $object->getBlkioDeviceWriteIOps(); - if (is_array($object->getBlkioDeviceWriteIOps())) { + $data->{'BlkioDeviceReadIOps'} = $value_12; + $value_14 = $object->getBlkioDeviceWriteBps(); + if (is_array($object->getBlkioDeviceWriteBps())) { $values_7 = []; - foreach ($object->getBlkioDeviceWriteIOps() as $value_15) { + foreach ($object->getBlkioDeviceWriteBps() as $value_15) { $values_7[] = $this->serializer->serialize($value_15, 'raw', $context); } $value_14 = $values_7; } + if (is_null($object->getBlkioDeviceWriteBps())) { + $value_14 = $object->getBlkioDeviceWriteBps(); + } + $data->{'BlkioDeviceWriteBps'} = $value_14; + $value_16 = $object->getBlkioDeviceWriteIOps(); + if (is_array($object->getBlkioDeviceWriteIOps())) { + $values_8 = []; + foreach ($object->getBlkioDeviceWriteIOps() as $value_17) { + $values_8[] = $this->serializer->serialize($value_17, 'raw', $context); + } + $value_16 = $values_8; + } if (is_null($object->getBlkioDeviceWriteIOps())) { - $value_14 = $object->getBlkioDeviceWriteIOps(); + $value_16 = $object->getBlkioDeviceWriteIOps(); } - $data->{'BlkioDeviceWriteIOps'} = $value_14; + $data->{'BlkioDeviceWriteIOps'} = $value_16; if (null !== $object->getMemorySwappiness()) { $data->{'MemorySwappiness'} = $object->getMemorySwappiness(); } @@ -559,29 +603,29 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getPidsLimit()) { $data->{'PidsLimit'} = $object->getPidsLimit(); } - $value_16 = $object->getPortBindings(); + $value_18 = $object->getPortBindings(); if (is_object($object->getPortBindings())) { - $values_8 = new \stdClass(); - foreach ($object->getPortBindings() as $key_1 => $value_17) { - $value_18 = $value_17; - if (is_array($value_17)) { - $values_9 = []; - foreach ($value_17 as $value_19) { - $values_9[] = $this->serializer->serialize($value_19, 'raw', $context); + $values_9 = new \stdClass(); + foreach ($object->getPortBindings() as $key_2 => $value_19) { + $value_20 = $value_19; + if (is_array($value_19)) { + $values_10 = []; + foreach ($value_19 as $value_21) { + $values_10[] = $this->serializer->serialize($value_21, 'raw', $context); } - $value_18 = $values_9; + $value_20 = $values_10; } - if (is_null($value_17)) { - $value_18 = $value_17; + if (is_null($value_19)) { + $value_20 = $value_19; } - $values_8->{$key_1} = $value_18; + $values_9->{$key_2} = $value_20; } - $value_16 = $values_8; + $value_18 = $values_9; } if (is_null($object->getPortBindings())) { - $value_16 = $object->getPortBindings(); + $value_18 = $object->getPortBindings(); } - $data->{'PortBindings'} = $value_16; + $data->{'PortBindings'} = $value_18; if (null !== $object->getPublishAllPorts()) { $data->{'PublishAllPorts'} = $object->getPublishAllPorts(); } @@ -591,126 +635,126 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getReadonlyRootfs()) { $data->{'ReadonlyRootfs'} = $object->getReadonlyRootfs(); } - $value_20 = $object->getSysctls(); + $value_22 = $object->getSysctls(); if (is_object($object->getSysctls())) { - $values_10 = new \stdClass(); - foreach ($object->getSysctls() as $key_2 => $value_21) { - $values_10->{$key_2} = $value_21; - } - $value_20 = $values_10; - } - if (is_null($object->getSysctls())) { - $value_20 = $object->getSysctls(); - } - $data->{'Sysctls'} = $value_20; - $value_22 = $object->getStorageOpt(); - if (is_object($object->getStorageOpt())) { $values_11 = new \stdClass(); - foreach ($object->getStorageOpt() as $key_3 => $value_23) { + foreach ($object->getSysctls() as $key_3 => $value_23) { $values_11->{$key_3} = $value_23; } $value_22 = $values_11; } - if (is_null($object->getStorageOpt())) { - $value_22 = $object->getStorageOpt(); + if (is_null($object->getSysctls())) { + $value_22 = $object->getSysctls(); } - $data->{'StorageOpt'} = $value_22; - $value_24 = $object->getDns(); - if (is_array($object->getDns())) { - $values_12 = []; - foreach ($object->getDns() as $value_25) { - $values_12[] = $value_25; + $data->{'Sysctls'} = $value_22; + $value_24 = $object->getStorageOpt(); + if (is_object($object->getStorageOpt())) { + $values_12 = new \stdClass(); + foreach ($object->getStorageOpt() as $key_4 => $value_25) { + $values_12->{$key_4} = $value_25; } $value_24 = $values_12; } - if (is_null($object->getDns())) { - $value_24 = $object->getDns(); + if (is_null($object->getStorageOpt())) { + $value_24 = $object->getStorageOpt(); } - $data->{'Dns'} = $value_24; - $value_26 = $object->getDnsOptions(); - if (is_array($object->getDnsOptions())) { + $data->{'StorageOpt'} = $value_24; + $value_26 = $object->getDns(); + if (is_array($object->getDns())) { $values_13 = []; - foreach ($object->getDnsOptions() as $value_27) { + foreach ($object->getDns() as $value_27) { $values_13[] = $value_27; } $value_26 = $values_13; } - if (is_null($object->getDnsOptions())) { - $value_26 = $object->getDnsOptions(); + if (is_null($object->getDns())) { + $value_26 = $object->getDns(); } - $data->{'DnsOptions'} = $value_26; - $value_28 = $object->getDnsSearch(); - if (is_array($object->getDnsSearch())) { + $data->{'Dns'} = $value_26; + $value_28 = $object->getDnsOptions(); + if (is_array($object->getDnsOptions())) { $values_14 = []; - foreach ($object->getDnsSearch() as $value_29) { + foreach ($object->getDnsOptions() as $value_29) { $values_14[] = $value_29; } $value_28 = $values_14; } - if (is_null($object->getDnsSearch())) { - $value_28 = $object->getDnsSearch(); + if (is_null($object->getDnsOptions())) { + $value_28 = $object->getDnsOptions(); } - $data->{'DnsSearch'} = $value_28; - $value_30 = $object->getExtraHosts(); - if (is_array($object->getExtraHosts())) { + $data->{'DnsOptions'} = $value_28; + $value_30 = $object->getDnsSearch(); + if (is_array($object->getDnsSearch())) { $values_15 = []; - foreach ($object->getExtraHosts() as $value_31) { + foreach ($object->getDnsSearch() as $value_31) { $values_15[] = $value_31; } $value_30 = $values_15; } - if (is_null($object->getExtraHosts())) { - $value_30 = $object->getExtraHosts(); + if (is_null($object->getDnsSearch())) { + $value_30 = $object->getDnsSearch(); } - $data->{'ExtraHosts'} = $value_30; - $value_32 = $object->getVolumesFrom(); - if (is_array($object->getVolumesFrom())) { + $data->{'DnsSearch'} = $value_30; + $value_32 = $object->getExtraHosts(); + if (is_array($object->getExtraHosts())) { $values_16 = []; - foreach ($object->getVolumesFrom() as $value_33) { + foreach ($object->getExtraHosts() as $value_33) { $values_16[] = $value_33; } $value_32 = $values_16; } - if (is_null($object->getVolumesFrom())) { - $value_32 = $object->getVolumesFrom(); + if (is_null($object->getExtraHosts())) { + $value_32 = $object->getExtraHosts(); } - $data->{'VolumesFrom'} = $value_32; - $value_34 = $object->getCapAdd(); - if (is_array($object->getCapAdd())) { + $data->{'ExtraHosts'} = $value_32; + $value_34 = $object->getVolumesFrom(); + if (is_array($object->getVolumesFrom())) { $values_17 = []; - foreach ($object->getCapAdd() as $value_35) { + foreach ($object->getVolumesFrom() as $value_35) { $values_17[] = $value_35; } $value_34 = $values_17; } - if (is_null($object->getCapAdd())) { - $value_34 = $object->getCapAdd(); + if (is_null($object->getVolumesFrom())) { + $value_34 = $object->getVolumesFrom(); } - $data->{'CapAdd'} = $value_34; - $value_36 = $object->getCapDrop(); - if (is_array($object->getCapDrop())) { + $data->{'VolumesFrom'} = $value_34; + $value_36 = $object->getCapAdd(); + if (is_array($object->getCapAdd())) { $values_18 = []; - foreach ($object->getCapDrop() as $value_37) { + foreach ($object->getCapAdd() as $value_37) { $values_18[] = $value_37; } $value_36 = $values_18; } - if (is_null($object->getCapDrop())) { - $value_36 = $object->getCapDrop(); + if (is_null($object->getCapAdd())) { + $value_36 = $object->getCapAdd(); } - $data->{'CapDrop'} = $value_36; - $value_38 = $object->getGroupAdd(); - if (is_array($object->getGroupAdd())) { + $data->{'CapAdd'} = $value_36; + $value_38 = $object->getCapDrop(); + if (is_array($object->getCapDrop())) { $values_19 = []; - foreach ($object->getGroupAdd() as $value_39) { + foreach ($object->getCapDrop() as $value_39) { $values_19[] = $value_39; } $value_38 = $values_19; } + if (is_null($object->getCapDrop())) { + $value_38 = $object->getCapDrop(); + } + $data->{'CapDrop'} = $value_38; + $value_40 = $object->getGroupAdd(); + if (is_array($object->getGroupAdd())) { + $values_20 = []; + foreach ($object->getGroupAdd() as $value_41) { + $values_20[] = $value_41; + } + $value_40 = $values_20; + } if (is_null($object->getGroupAdd())) { - $value_38 = $object->getGroupAdd(); + $value_40 = $object->getGroupAdd(); } - $data->{'GroupAdd'} = $value_38; + $data->{'GroupAdd'} = $value_40; if (null !== $object->getRestartPolicy()) { $data->{'RestartPolicy'} = $this->serializer->serialize($object->getRestartPolicy(), 'raw', $context); } @@ -720,42 +764,42 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getNetworkMode()) { $data->{'NetworkMode'} = $object->getNetworkMode(); } - $value_40 = $object->getDevices(); + $value_42 = $object->getDevices(); if (is_array($object->getDevices())) { - $values_20 = []; - foreach ($object->getDevices() as $value_41) { - $values_20[] = $this->serializer->serialize($value_41, 'raw', $context); + $values_21 = []; + foreach ($object->getDevices() as $value_43) { + $values_21[] = $this->serializer->serialize($value_43, 'raw', $context); } - $value_40 = $values_20; + $value_42 = $values_21; } if (is_null($object->getDevices())) { - $value_40 = $object->getDevices(); + $value_42 = $object->getDevices(); } - $data->{'Devices'} = $value_40; - $value_42 = $object->getUlimits(); + $data->{'Devices'} = $value_42; + $value_44 = $object->getUlimits(); if (is_array($object->getUlimits())) { - $values_21 = []; - foreach ($object->getUlimits() as $value_43) { - $values_21[] = $this->serializer->serialize($value_43, 'raw', $context); + $values_22 = []; + foreach ($object->getUlimits() as $value_45) { + $values_22[] = $this->serializer->serialize($value_45, 'raw', $context); } - $value_42 = $values_21; + $value_44 = $values_22; } if (is_null($object->getUlimits())) { - $value_42 = $object->getUlimits(); + $value_44 = $object->getUlimits(); } - $data->{'Ulimits'} = $value_42; - $value_44 = $object->getSecurityOpt(); + $data->{'Ulimits'} = $value_44; + $value_46 = $object->getSecurityOpt(); if (is_array($object->getSecurityOpt())) { - $values_22 = []; - foreach ($object->getSecurityOpt() as $value_45) { - $values_22[] = $value_45; + $values_23 = []; + foreach ($object->getSecurityOpt() as $value_47) { + $values_23[] = $value_47; } - $value_44 = $values_22; + $value_46 = $values_23; } if (is_null($object->getSecurityOpt())) { - $value_44 = $object->getSecurityOpt(); + $value_46 = $object->getSecurityOpt(); } - $data->{'SecurityOpt'} = $value_44; + $data->{'SecurityOpt'} = $value_46; if (null !== $object->getLogConfig()) { $data->{'LogConfig'} = $this->serializer->serialize($object->getLogConfig(), 'raw', $context); } From db2204c64d8f5c34153183db87718bfe758ffe0a Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Wed, 21 Feb 2018 11:44:44 +0100 Subject: [PATCH 5/5] HTTPlug Symfony bundle integration doc (#257) --- docs/cookbook/httplug-bundle.md | 42 +++++++++++++++++++++++++++++++++ docs/index.md | 1 + 2 files changed, 43 insertions(+) create mode 100644 docs/cookbook/httplug-bundle.md diff --git a/docs/cookbook/httplug-bundle.md b/docs/cookbook/httplug-bundle.md new file mode 100644 index 00000000..70e5c626 --- /dev/null +++ b/docs/cookbook/httplug-bundle.md @@ -0,0 +1,42 @@ +# HTTPlug bundle + +If you are using [Symfony](http://symfony.com/) +with the [HTTPlug bundle](http://docs.php-http.org/en/latest/integrations/symfony-bundle.html), +you may want to setup the client to take benefit of the profiling, without have to re-configure all the stuff. + +To do it, we have to call `Docker\DockerClient::createFormEnv` factory method from the HTTPlug factory. + +First, declare the factory service: + +```yaml +services: + httplug.factory.docker: + class: Http\HttplugBundle\Collector\ProfileClientFactory + arguments: + $factory: [ Docker\DockerClient, 'createFromEnv' ] +``` + +The `ProfileClientFactory` will detect and call the passed `DockerClient` factory method. + +Then, declare the client on the HTTPlug bundle configuration: + +```yaml +httplug: + plugins: + logger: ~ + clients: + docker: + factory: 'httplug.factory.docker' + plugins: ['httplug.plugin.logger'] +``` + +Finally, declare your `Docker\Docker` instance as a service, giving the HTTPlug client wrapper: + +```yaml +services: + Docker\Docker: + arguments: + $httpClient: '@httplug.client.docker' +``` + +And voilĂ ! Just call your `Docker\Docker` service and you will get the same result with profiling and logs. diff --git a/docs/index.md b/docs/index.md index 79390ca3..50a89d3a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,3 +20,4 @@ problems and advanced usage when using Docker-PHP * [Running a container](cookbook/container-run.md) * [Build an image](cookbook/build-image.md) +* [HTTPlug Bundle](cookbook/httplug-bundle.md)